Facelook commited on
Commit
ca0617a
·
1 Parent(s): c0935d5

Trial and error.

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -17,16 +17,12 @@ class BasicAgent:
17
  def __init__(self):
18
  print("BasicAgent initialized.")
19
  # Try multiple models in order of preference with better error handling
20
- self.model_name = "mistralai/Mistral-7B-v0.1" # Updated to Mistral 7B - free on HF Hub
21
  self.hf_token = os.getenv("HF_TOKEN") # Get token from environment if available
22
 
23
  # List of fallback models (free models that don't require authentication)
24
  self.fallback_models = [
25
- "microsoft/phi-2", # 2.7B powerful model that's free to use
26
- "TinyLlama/TinyLlama-1.1B-Chat-v1.0", # Smaller but efficient chat model
27
- "google/flan-t5-small", # Small but doesn't require authentication
28
- "facebook/opt-125m", # Another small fallback option
29
- "bigscience/bloom-560m" # Small BLOOM model as final fallback
30
  ]
31
 
32
  try:
@@ -270,8 +266,6 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
270
  agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
271
  print(agent_code)
272
 
273
- return
274
-
275
  # 2. Fetch Questions
276
  print(f"Fetching questions from: {questions_url}")
277
  try:
 
17
  def __init__(self):
18
  print("BasicAgent initialized.")
19
  # Try multiple models in order of preference with better error handling
20
+ self.model_name = "meta-llama/Llama-3.2-3B-Instruct"
21
  self.hf_token = os.getenv("HF_TOKEN") # Get token from environment if available
22
 
23
  # List of fallback models (free models that don't require authentication)
24
  self.fallback_models = [
25
+ TinyLlama / TinyLlama - 1.1B - Chat - v1.0
 
 
 
 
26
  ]
27
 
28
  try:
 
266
  agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
267
  print(agent_code)
268
 
 
 
269
  # 2. Fetch Questions
270
  print(f"Fetching questions from: {questions_url}")
271
  try: