Ihssane123 commited on
Commit
dd9abdd
·
verified ·
1 Parent(s): 8e8cfe8

Update app.py: fixing a bug

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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