Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 15 |
class BasicAgent:
|
| 16 |
def __init__(self):
|
| 17 |
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
|
| 18 |
-
self.model = genai.GenerativeModel("gemini-
|
| 19 |
self.files_base_url = "https://agents-course-unit4-scoring.hf.space/files"
|
| 20 |
print("Gemini-powered BasicAgent initialized.")
|
| 21 |
|
|
@@ -24,14 +24,14 @@ class BasicAgent:
|
|
| 24 |
task_id = question_data.get("task_id", "")
|
| 25 |
file_names = question_data.get("file_names", [])
|
| 26 |
|
| 27 |
-
# Research Advisory-style prompt
|
| 28 |
system_prompt = (
|
| 29 |
-
"
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
"
|
| 34 |
-
f"
|
| 35 |
)
|
| 36 |
|
| 37 |
try:
|
|
|
|
| 15 |
class BasicAgent:
|
| 16 |
def __init__(self):
|
| 17 |
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
|
| 18 |
+
self.model = genai.GenerativeModel("gemini-1.5-pro")
|
| 19 |
self.files_base_url = "https://agents-course-unit4-scoring.hf.space/files"
|
| 20 |
print("Gemini-powered BasicAgent initialized.")
|
| 21 |
|
|
|
|
| 24 |
task_id = question_data.get("task_id", "")
|
| 25 |
file_names = question_data.get("file_names", [])
|
| 26 |
|
| 27 |
+
# Research Advisory-style prompt (English)
|
| 28 |
system_prompt = (
|
| 29 |
+
"You are an agent working in a research laboratory specializing in solving complex problems.\n"
|
| 30 |
+
"Your team includes experts in language understanding, image analysis, information retrieval, and logical reasoning.\n"
|
| 31 |
+
"Work collaboratively and approach the problem step by step.\n\n"
|
| 32 |
+
"The final answer must be in English, strictly following the required format in the question.\n"
|
| 33 |
+
"Please return only the answer as a single sentence, with no explanation or additional information.\n\n"
|
| 34 |
+
f"[Problem]\n{question_text}"
|
| 35 |
)
|
| 36 |
|
| 37 |
try:
|