Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ class BasicAgent:
|
|
| 21 |
# --- 1. API KEY CHECK ---
|
| 22 |
mistral_key = os.getenv("MISTRAL_API_KEY")
|
| 23 |
if not mistral_key:
|
| 24 |
-
#
|
| 25 |
print("Mistral Key not found. Please set MISTRAL_API_KEY for best results.")
|
| 26 |
# Fallback logic if needed, but for now we raise error to alert user
|
| 27 |
raise ValueError("MISTRAL_API_KEY missing!")
|
|
@@ -106,7 +106,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 106 |
return f" Agent Init Error: {e}", None
|
| 107 |
|
| 108 |
agent_code_link = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
| 109 |
-
print(f"
|
| 110 |
|
| 111 |
# --- C. FETCH QUESTIONS ---
|
| 112 |
try:
|
|
@@ -198,7 +198,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 198 |
|
| 199 |
# --- GRADIO UI ---
|
| 200 |
with gr.Blocks() as demo:
|
| 201 |
-
gr.Markdown("#
|
| 202 |
gr.Markdown("""
|
| 203 |
**Instruction:**
|
| 204 |
1. Login via Hugging Face button.
|
|
|
|
| 21 |
# --- 1. API KEY CHECK ---
|
| 22 |
mistral_key = os.getenv("MISTRAL_API_KEY")
|
| 23 |
if not mistral_key:
|
| 24 |
+
# Fallback to Qwen if Mistral is unavailable.
|
| 25 |
print("Mistral Key not found. Please set MISTRAL_API_KEY for best results.")
|
| 26 |
# Fallback logic if needed, but for now we raise error to alert user
|
| 27 |
raise ValueError("MISTRAL_API_KEY missing!")
|
|
|
|
| 106 |
return f" Agent Init Error: {e}", None
|
| 107 |
|
| 108 |
agent_code_link = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
| 109 |
+
print(f"Code Link: {agent_code_link}")
|
| 110 |
|
| 111 |
# --- C. FETCH QUESTIONS ---
|
| 112 |
try:
|
|
|
|
| 198 |
|
| 199 |
# --- GRADIO UI ---
|
| 200 |
with gr.Blocks() as demo:
|
| 201 |
+
gr.Markdown("# GAIA Agent Solver (Mistral + Files Fix)")
|
| 202 |
gr.Markdown("""
|
| 203 |
**Instruction:**
|
| 204 |
1. Login via Hugging Face button.
|