Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool, LiteLLMModel
|
|
|
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -72,12 +73,8 @@ ddg = DuckDuckGoSearchTool()
|
|
| 72 |
# temperature=0.5
|
| 73 |
# )
|
| 74 |
|
| 75 |
-
model =
|
| 76 |
-
|
| 77 |
-
trust_remote_code=True, # needed if the repo defines its own model classes
|
| 78 |
-
device="cuda", # or "cpu" if no GPU
|
| 79 |
-
quantize="4bit" # optional: drastically reduce VRAM usage
|
| 80 |
-
)
|
| 81 |
|
| 82 |
# Import tool from Hub
|
| 83 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
|
| 1 |
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool, LiteLLMModel
|
| 2 |
+
from ollama.smol_compatiable_model import OllamaQwen7BClientModel
|
| 3 |
import datetime
|
| 4 |
import requests
|
| 5 |
import pytz
|
|
|
|
| 73 |
# temperature=0.5
|
| 74 |
# )
|
| 75 |
|
| 76 |
+
model = OllamaQwen7BClientModel()
|
| 77 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
# Import tool from Hub
|
| 80 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|