Nymbo commited on
Commit
d9e3bb0
·
verified ·
1 Parent(s): 428950f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -2737,17 +2737,10 @@ def Deep_Research(
2737
  # Build outputs
2738
  links_text = "\n".join([f"[{i+1}] {u}" for i, u in enumerate(pages.keys())])
2739
  file_path = _write_report_tmp(report)
2740
- file_url = _public_file_url(file_path)
2741
- # Append a canonical HF download link so clients avoid proxy origins when clicking
2742
- try:
2743
- if isinstance(file_url, str) and file_url.startswith("http"):
2744
- report = report.rstrip() + f"\n\n---\nDownload the full report as text: [research_report.txt]({file_url})\n"
2745
- except Exception:
2746
- pass
2747
  elapsed = time.time() - start_ts
2748
  # Print explicit timing and include in structured log output
2749
  print(f"[TIMING] Deep_Research elapsed: {elapsed:.2f}s", flush=True)
2750
- _log_call_end("Deep_Research", f"urls={len(pages)} file={os.path.basename(file_path)} duration={elapsed:.2f}s url={file_url}")
2751
  # Keep return signature for existing UI (report, links, file path). MCP clients can prefer the URL by
2752
  # reading the api_description instruction or deriving it from the path using the same rule.
2753
  return report, links_text, file_path
 
2737
  # Build outputs
2738
  links_text = "\n".join([f"[{i+1}] {u}" for i, u in enumerate(pages.keys())])
2739
  file_path = _write_report_tmp(report)
 
 
 
 
 
 
 
2740
  elapsed = time.time() - start_ts
2741
  # Print explicit timing and include in structured log output
2742
  print(f"[TIMING] Deep_Research elapsed: {elapsed:.2f}s", flush=True)
2743
+ _log_call_end("Deep_Research", f"urls={len(pages)} file={os.path.basename(file_path)} duration={elapsed:.2f}s")
2744
  # Keep return signature for existing UI (report, links, file path). MCP clients can prefer the URL by
2745
  # reading the api_description instruction or deriving it from the path using the same rule.
2746
  return report, links_text, file_path