0r0b0r0s commited on
Commit
21b853b
·
verified ·
1 Parent(s): 84fec8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ class BasicAgent:
21
  # Use free-tier compatible Qwen model via Inference API
22
  self.client = InferenceClient(
23
  model="Qwen/Qwen2-7B-Instruct",
24
- token=os.environ.get("HF_TOKEN", "free") # Works without token
25
  )
26
 
27
  def __call__(self, question: str) -> str:
@@ -68,7 +68,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
68
 
69
  # 1. Instantiate Agent ( modify this part to create your agent)
70
  try:
71
- hf_token = os.getenv("HF_TOKEN") # Set this in Space settings
72
  agent = BasicAgent(hf_token=hf_token)
73
  except Exception as e:
74
  print(f"Error instantiating agent: {e}")
 
21
  # Use free-tier compatible Qwen model via Inference API
22
  self.client = InferenceClient(
23
  model="Qwen/Qwen2-7B-Instruct",
24
+ token=os.getenv("HF_TOKEN") # Works without token
25
  )
26
 
27
  def __call__(self, question: str) -> str:
 
68
 
69
  # 1. Instantiate Agent ( modify this part to create your agent)
70
  try:
71
+ # Set this in Space settings
72
  agent = BasicAgent(hf_token=hf_token)
73
  except Exception as e:
74
  print(f"Error instantiating agent: {e}")