manu commited on
Commit
9f50157
·
verified ·
1 Parent(s): 753315a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -321,11 +321,11 @@ DEFAULT_MCP_SERVER_LABEL = "colpali_rag"
321
  # =============================
322
 
323
  def stream_agent(question: str,
324
- api_key: str,
325
- model_name: str,
326
- server_url: str,
327
- server_label: str,
328
- visual_reasoning: str):
329
  """
330
  Multi-round streaming:
331
  • Seed: optional local ColPali search on the user question to attach initial pages.
@@ -345,6 +345,7 @@ def stream_agent(question: str,
345
 
346
  allowed_tools = "test_deepsearch_image_search" if visual_reasoning else "test_deepsearch_search_synthetize"
347
  SYSTEM= SYSTEM1 if visual_reasoning else SYSTEM2
 
348
 
349
  if not api_key:
350
  yield "⚠️ **Please provide your OpenAI API key.**", "", ""
 
321
  # =============================
322
 
323
  def stream_agent(question: str,
324
+ api_key: str = None,
325
+ model_name: str = "gpt-5",
326
+ server_url: str = "https://manu-test-deepsearch.hf.space/gradio_api/mcp/",
327
+ server_label: str = "colpali_rag",
328
+ visual_reasoning: str = "Visual Summary Reasoning"):
329
  """
330
  Multi-round streaming:
331
  • Seed: optional local ColPali search on the user question to attach initial pages.
 
345
 
346
  allowed_tools = "test_deepsearch_image_search" if visual_reasoning else "test_deepsearch_search_synthetize"
347
  SYSTEM= SYSTEM1 if visual_reasoning else SYSTEM2
348
+ api_key = api_key_env if api_key is None else api_key
349
 
350
  if not api_key:
351
  yield "⚠️ **Please provide your OpenAI API key.**", "", ""