Spaces:
Runtime error

Dugelon commited on
Commit
dec55f3
·
verified ·
1 Parent(s): 1516b10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import datetime
3
  import requests
4
  import pytz
5
  import yaml
 
6
  from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
@@ -44,7 +45,10 @@ max_tokens=2096,
44
  temperature=0.5,
45
  #model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
46
  #model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
47
- model_id = 'codellama/CodeLlama-70b-hf',
 
 
 
48
  custom_role_conversions=None,
49
  )
50
 
 
3
  import requests
4
  import pytz
5
  import yaml
6
+ from transformers import AutoTokenizer, AutoModelForCausalLM
7
  from tools.final_answer import FinalAnswerTool
8
 
9
  from Gradio_UI import GradioUI
 
45
  temperature=0.5,
46
  #model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
47
  #model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
48
+ #model_id = 'codellama/CodeLlama-70b-hf',
49
+ #model_id ='https://huggingface.co/codellama/CodeLlama-70b-hf'
50
+ tokenizer = AutoTokenizer.from_pretrained("codellama/CodeLlama-70b-hf")
51
+ model_id = AutoModelForCausalLM.from_pretrained("codellama/CodeLlama-70b-hf")
52
  custom_role_conversions=None,
53
  )
54