Trial and error.
Browse files
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 = "
|
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 |
-
|
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:
|