Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,13 +5,13 @@ import inspect
|
|
| 5 |
import pandas as pd
|
| 6 |
import json
|
| 7 |
from duckduckgo_search import DDGS
|
| 8 |
-
from dotenv import load_dotenv
|
| 9 |
import ast # For safely evaluating literal structures if needed, though JSON is preferred
|
| 10 |
|
| 11 |
# --- Constants ---
|
| 12 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 13 |
-
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
# --- Basic Agent Definition ---
|
| 17 |
class BasicAgent:
|
|
@@ -22,7 +22,7 @@ class BasicAgent:
|
|
| 22 |
if not self.api_key:
|
| 23 |
raise ValueError("OpenRouter API Key not found.")
|
| 24 |
self.scorer_api_url = DEFAULT_API_URL # For fetching files/submitting
|
| 25 |
-
self.llm_api_url =
|
| 26 |
self.model_name = MODEL_NAME
|
| 27 |
|
| 28 |
# Load system prompt
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
import json
|
| 7 |
from duckduckgo_search import DDGS
|
|
|
|
| 8 |
import ast # For safely evaluating literal structures if needed, though JSON is preferred
|
| 9 |
|
| 10 |
# --- Constants ---
|
| 11 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 12 |
+
HF_API_URL = "https://api-inference.huggingface.co/models/deepseek-ai/DeepSeek-V3"
|
| 13 |
+
TEST_AGENT_KEY = os.getenv("TEST_AGENT_KEY") # Make sure you add this secret in your Hugging Face Space
|
| 14 |
+
MODEL_NAME = "deepseek-ai/Deepseek-V3"
|
| 15 |
|
| 16 |
# --- Basic Agent Definition ---
|
| 17 |
class BasicAgent:
|
|
|
|
| 22 |
if not self.api_key:
|
| 23 |
raise ValueError("OpenRouter API Key not found.")
|
| 24 |
self.scorer_api_url = DEFAULT_API_URL # For fetching files/submitting
|
| 25 |
+
self.llm_api_url = HF_API_URL
|
| 26 |
self.model_name = MODEL_NAME
|
| 27 |
|
| 28 |
# Load system prompt
|