Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,9 +82,14 @@ extract_text_tool = Tool(
|
|
| 82 |
)
|
| 83 |
|
| 84 |
# Generate the chat interface, including the tools
|
| 85 |
-
print("Loading LLM...")
|
| 86 |
-
ollama.pull('gemma3:4b')
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
print(f"Model {chat.model} downloaded!")
|
| 89 |
|
| 90 |
tools = [get_file_path_tool, get_content_tool, extract_text_tool, search_web_tool]
|
|
|
|
| 82 |
)
|
| 83 |
|
| 84 |
# Generate the chat interface, including the tools
|
| 85 |
+
# print("Loading LLM...")
|
| 86 |
+
# ollama.pull('gemma3:4b')
|
| 87 |
+
from transformers import AutoProcessor, AutoModelForImageTextToText
|
| 88 |
+
|
| 89 |
+
processor = AutoProcessor.from_pretrained("google/gemma-3-4b-it")
|
| 90 |
+
model = AutoModelForImageTextToText.from_pretrained("google/gemma-3-4b-it")
|
| 91 |
+
|
| 92 |
+
chat = ChatOllama(model=model, verbose=True)
|
| 93 |
print(f"Model {chat.model} downloaded!")
|
| 94 |
|
| 95 |
tools = [get_file_path_tool, get_content_tool, extract_text_tool, search_web_tool]
|