Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- README.md +1 -0
- __pycache__/research_manager.cpython-312.pyc +0 -0
- deep_researcher.py +4 -4
- requirements.txt +0 -1
- research_manager.py +5 -4
README.md
CHANGED
|
@@ -3,4 +3,5 @@ title: deep_researcher
|
|
| 3 |
app_file: deep_researcher.py
|
| 4 |
sdk: gradio
|
| 5 |
sdk_version: 5.23.3
|
|
|
|
| 6 |
---
|
|
|
|
| 3 |
app_file: deep_researcher.py
|
| 4 |
sdk: gradio
|
| 5 |
sdk_version: 5.23.3
|
| 6 |
+
emoji: 🦸♂️
|
| 7 |
---
|
__pycache__/research_manager.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/research_manager.cpython-312.pyc and b/__pycache__/research_manager.cpython-312.pyc differ
|
|
|
deep_researcher.py
CHANGED
|
@@ -13,15 +13,15 @@ async def run(query: str):
|
|
| 13 |
with gr.Blocks(theme="soft") as ui:
|
| 14 |
gr.Markdown(
|
| 15 |
"""
|
| 16 |
-
# Deep Researcher (
|
| 17 |
This is a deep research tool that uses AI to research a specific topic and return a report. it supports any languages.
|
| 18 |
|
| 19 |
-
|
| 20 |
"""
|
| 21 |
)
|
| 22 |
|
| 23 |
-
query_textbox = gr.Textbox(label="What topic would you like to research?", placeholder="
|
| 24 |
-
run_button = gr.Button("Start Researching", variant="huggingface")
|
| 25 |
report = gr.Markdown(label="Report")
|
| 26 |
|
| 27 |
run_button.click(fn=run, inputs=query_textbox, outputs=report)
|
|
|
|
| 13 |
with gr.Blocks(theme="soft") as ui:
|
| 14 |
gr.Markdown(
|
| 15 |
"""
|
| 16 |
+
# 🦸♂️ Deep Researcher (深度研究者) by Efay Guo
|
| 17 |
This is a deep research tool that uses AI to research a specific topic and return a report. it supports any languages.
|
| 18 |
|
| 19 |
+
您可以使用这个工具深度调研一个问题,并得到一个详细的报告,支持任何语言。
|
| 20 |
"""
|
| 21 |
)
|
| 22 |
|
| 23 |
+
query_textbox = gr.Textbox(label="What topic would you like to research? / 您想要调研什么话题?", placeholder="Latest trends in AI agent frameworks in 2025 or 如何免费周游全世界")
|
| 24 |
+
run_button = gr.Button("Start Researching / 开始搜索", variant="huggingface")
|
| 25 |
report = gr.Markdown(label="Report")
|
| 26 |
|
| 27 |
run_button.click(fn=run, inputs=query_textbox, outputs=report)
|
requirements.txt
CHANGED
|
@@ -4,4 +4,3 @@ gradio
|
|
| 4 |
pypdf2
|
| 5 |
openai
|
| 6 |
openai-agents
|
| 7 |
-
|
|
|
|
| 4 |
pypdf2
|
| 5 |
openai
|
| 6 |
openai-agents
|
|
|
research_manager.py
CHANGED
|
@@ -12,13 +12,14 @@ class ResearchManager:
|
|
| 12 |
with trace("Research trace", trace_id=trace_id):
|
| 13 |
# print(f"View trace: https://platform.openai.com/traces/trace?trace_id={trace_id}")
|
| 14 |
# yield f"View trace: https://platform.openai.com/traces/trace?trace_id={trace_id}"
|
| 15 |
-
print("
|
|
|
|
| 16 |
search_plan = await self.plan_searches(query)
|
| 17 |
-
yield "Searches planned, starting to search
|
| 18 |
search_results = await self.perform_searches(search_plan)
|
| 19 |
-
yield "Searches complete, writing report
|
| 20 |
report = await self.write_report(query, search_results)
|
| 21 |
-
yield "Report is complete
|
| 22 |
yield report.markdown_report
|
| 23 |
|
| 24 |
|
|
|
|
| 12 |
with trace("Research trace", trace_id=trace_id):
|
| 13 |
# print(f"View trace: https://platform.openai.com/traces/trace?trace_id={trace_id}")
|
| 14 |
# yield f"View trace: https://platform.openai.com/traces/trace?trace_id={trace_id}"
|
| 15 |
+
print("Planning researches / 计划搜索内容...")
|
| 16 |
+
yield "Planning researches / 计划搜索内容..."
|
| 17 |
search_plan = await self.plan_searches(query)
|
| 18 |
+
yield "Searches planned, starting to search / 搜索计划完成,开始搜索..."
|
| 19 |
search_results = await self.perform_searches(search_plan)
|
| 20 |
+
yield "Searches complete, writing report / 搜索完成,开始写报告..."
|
| 21 |
report = await self.write_report(query, search_results)
|
| 22 |
+
yield "Report is complete / 报告完成"
|
| 23 |
yield report.markdown_report
|
| 24 |
|
| 25 |
|