lodist commited on
Commit
5d6ab25
·
verified ·
1 Parent(s): 773e78f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -6,19 +6,20 @@ import pandas as pd
6
  from smolagents import CodeAgent, DuckDuckGoSearchTool, VisitWebpageTool
7
  from smolagents.models import InferenceClientModel
8
 
9
- TOGETHER_API_KEY = os.getenv("TOGETHER_API_KEY")
10
 
11
- def get_together_model():
12
  return InferenceClientModel(
13
  model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
14
- provider="together",
15
- api_key=TOGETHER_API_KEY,
16
  temperature=0.2,
17
  max_tokens=8192,
18
  timeout=120,
19
  )
20
 
21
- MODEL = get_together_model()
 
22
 
23
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
24
 
 
6
  from smolagents import CodeAgent, DuckDuckGoSearchTool, VisitWebpageTool
7
  from smolagents.models import InferenceClientModel
8
 
9
+ HF_API_TOKEN = os.getenv("HF_TOKEN")
10
 
11
+ def get_hf_model():
12
  return InferenceClientModel(
13
  model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
14
+ # provider="auto", # You can omit this, 'auto' is the default
15
+ token=HF_API_TOKEN, # Use 'token' instead of 'api_key'
16
  temperature=0.2,
17
  max_tokens=8192,
18
  timeout=120,
19
  )
20
 
21
+ # Make sure to update this line too
22
+ MODEL = get_hf_model()
23
 
24
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
25