Spaces:
Sleeping
Sleeping
Update app.py: fixing a bug
Browse files
app.py
CHANGED
|
@@ -41,7 +41,10 @@ final_answer = FinalAnswerTool()
|
|
| 41 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 42 |
#model_id='HuggingFaceTB/SmolLM2-1.7B'
|
| 43 |
# pip install transformers
|
|
|
|
| 44 |
model_id = "HuggingFaceTB/SmolLM2-1.7B-Instruct"
|
|
|
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
|
|
|
|
| 41 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 42 |
#model_id='HuggingFaceTB/SmolLM2-1.7B'
|
| 43 |
# pip install transformers
|
| 44 |
+
device="cpu"
|
| 45 |
model_id = "HuggingFaceTB/SmolLM2-1.7B-Instruct"
|
| 46 |
+
model = AutoModelForCausalLM.from_pretrained(model_id).to(device)
|
| 47 |
+
|
| 48 |
|
| 49 |
|
| 50 |
|