Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ llm = LlamaCpp(
|
|
| 44 |
n_threads=4,
|
| 45 |
n_gpu_layers=0,
|
| 46 |
temperature=0.7,
|
| 47 |
-
top_p=0.
|
| 48 |
max_tokens=150,
|
| 49 |
n_batch=64,
|
| 50 |
verbose=False,
|
|
@@ -530,7 +530,7 @@ class GaiaRunner:
|
|
| 530 |
# ุฑุงุจุท API ูุชุญู
ูู ุงูู
ูู
|
| 531 |
url = f"https://agents-course-unit4-scoring.hf.space/files/{file_name}"
|
| 532 |
local_path = os.path.join("attachments", file_name)
|
| 533 |
-
|
| 534 |
# ุชูุฒูู ุงูู
ูู ุฅุฐุง ูู
ููู ู
ูุฌูุฏูุง ู
ุญูููุง
|
| 535 |
if not os.path.exists(local_path):
|
| 536 |
try:
|
|
@@ -539,13 +539,16 @@ class GaiaRunner:
|
|
| 539 |
with open(local_path, "wb") as f:
|
| 540 |
f.write(r.content)
|
| 541 |
print(f"[GAIA] Attachment downloaded: {local_path}")
|
|
|
|
| 542 |
except Exception as e:
|
| 543 |
print(f"[GAIA] Failed to download attachment: {e}")
|
| 544 |
-
|
|
|
|
| 545 |
else:
|
| 546 |
print(f"[GAIA] Attachment already exists: {local_path}")
|
| 547 |
|
| 548 |
-
|
|
|
|
| 549 |
|
| 550 |
# -------------------- LangGraph Integration --------------------
|
| 551 |
if LANGGRAPH_AVAILABLE:
|
|
|
|
| 44 |
n_threads=4,
|
| 45 |
n_gpu_layers=0,
|
| 46 |
temperature=0.7,
|
| 47 |
+
top_p=0.8,
|
| 48 |
max_tokens=150,
|
| 49 |
n_batch=64,
|
| 50 |
verbose=False,
|
|
|
|
| 530 |
# ุฑุงุจุท API ูุชุญู
ูู ุงูู
ูู
|
| 531 |
url = f"https://agents-course-unit4-scoring.hf.space/files/{file_name}"
|
| 532 |
local_path = os.path.join("attachments", file_name)
|
| 533 |
+
u=None
|
| 534 |
# ุชูุฒูู ุงูู
ูู ุฅุฐุง ูู
ููู ู
ูุฌูุฏูุง ู
ุญูููุง
|
| 535 |
if not os.path.exists(local_path):
|
| 536 |
try:
|
|
|
|
| 539 |
with open(local_path, "wb") as f:
|
| 540 |
f.write(r.content)
|
| 541 |
print(f"[GAIA] Attachment downloaded: {local_path}")
|
| 542 |
+
u=local_path
|
| 543 |
except Exception as e:
|
| 544 |
print(f"[GAIA] Failed to download attachment: {e}")
|
| 545 |
+
u=url
|
| 546 |
+
return u
|
| 547 |
else:
|
| 548 |
print(f"[GAIA] Attachment already exists: {local_path}")
|
| 549 |
|
| 550 |
+
# return local_path
|
| 551 |
+
return u
|
| 552 |
|
| 553 |
# -------------------- LangGraph Integration --------------------
|
| 554 |
if LANGGRAPH_AVAILABLE:
|