Sushil Thapa
commited on
Specify smolagents version in requirements.txt
Browse filesWhen running offline, current code produces the following error on Python 3.12:
```bash
Traceback (most recent call last):
File "~/Agentic_RAG/app.py", line 3, in <module>
from smolagents import GradioUI, CodeAgent, HfApiModel
ImportError: cannot import name 'HfApiModel' from 'smolagents' (~/Agentic_RAG/.venv/lib/python3.12/site-packages/smolagents/__init__.py). Did you mean: 'ApiModel'?
```
The code uses `from smolagents import HfApiModel` which was removed in `smolagents 1.19`.
For simplicity, specifying `smolagents` to use `version 1.18` instead.
- requirements.txt +1 -1
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
datasets
|
2 |
-
smolagents
|
3 |
langchain-community
|
4 |
rank_bm25
|
5 |
duckduckgo-search
|
|
|
1 |
datasets
|
2 |
+
smolagents==1.18.0
|
3 |
langchain-community
|
4 |
rank_bm25
|
5 |
duckduckgo-search
|