Spaces:
Sleeping
Sleeping
arijit121 commited on
Commit ·
c19c4d4
1
Parent(s): 50e10e2
update
Browse files
app.py
CHANGED
|
@@ -9,11 +9,14 @@ from smolagents import (
|
|
| 9 |
DuckDuckGoSearchTool,
|
| 10 |
)
|
| 11 |
|
| 12 |
-
#
|
| 13 |
try:
|
| 14 |
-
from smolagents import
|
| 15 |
except ImportError:
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
| 17 |
import yaml
|
| 18 |
|
| 19 |
from tools.final_answer import FinalAnswerTool
|
|
|
|
| 9 |
DuckDuckGoSearchTool,
|
| 10 |
)
|
| 11 |
|
| 12 |
+
# Import the correct model class (name changed across versions)
|
| 13 |
try:
|
| 14 |
+
from smolagents import InferenceClientModel as ModelClass
|
| 15 |
except ImportError:
|
| 16 |
+
try:
|
| 17 |
+
from smolagents import HfApiModel as ModelClass
|
| 18 |
+
except ImportError:
|
| 19 |
+
from smolagents import ApiModel as ModelClass
|
| 20 |
import yaml
|
| 21 |
|
| 22 |
from tools.final_answer import FinalAnswerTool
|