Mustafa-albakkar commited on
Commit
924699e
ยท
verified ยท
1 Parent(s): 1250ed7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
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.9,
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
- return None
 
545
  else:
546
  print(f"[GAIA] Attachment already exists: {local_path}")
547
 
548
- return local_path
 
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: