Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ import traceback
|
|
| 11 |
# (Keep Constants as is)
|
| 12 |
# --- Constants ---
|
| 13 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 14 |
-
print("Token loaded:", bool(os.getenv("
|
| 15 |
custom_prompt = """
|
| 16 |
You are an intelligent AI agent participating in the GALA (Generative Agent Learning Assignment).
|
| 17 |
Your goal is to answer each question accurately, concisely, and factually.
|
|
@@ -53,7 +53,7 @@ CalculatorTool=Tool(
|
|
| 53 |
)
|
| 54 |
class BasicAgent:
|
| 55 |
def __init__(self):
|
| 56 |
-
api_key = os.getenv('
|
| 57 |
if not api_key:
|
| 58 |
raise ValueError("❌ Missing Hugging Face token. Add it in Settings → Secrets with the name 'chatbotagenthf'.")
|
| 59 |
model = InferenceClientModel(
|
|
|
|
| 11 |
# (Keep Constants as is)
|
| 12 |
# --- Constants ---
|
| 13 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 14 |
+
print("Token loaded:", bool(os.getenv("chatbotagenthf")))
|
| 15 |
custom_prompt = """
|
| 16 |
You are an intelligent AI agent participating in the GALA (Generative Agent Learning Assignment).
|
| 17 |
Your goal is to answer each question accurately, concisely, and factually.
|
|
|
|
| 53 |
)
|
| 54 |
class BasicAgent:
|
| 55 |
def __init__(self):
|
| 56 |
+
api_key = os.getenv('chatbotagenthf')
|
| 57 |
if not api_key:
|
| 58 |
raise ValueError("❌ Missing Hugging Face token. Add it in Settings → Secrets with the name 'chatbotagenthf'.")
|
| 59 |
model = InferenceClientModel(
|