CoolFace
Apppublic

ekanshA/DeepResearchAgent

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
deep_research.py24 linesDownload Raw Back to root
1import gradio as gr
2from dotenv import load_dotenv
3from research_manager import ResearchManager
4
5load_dotenv(override=True)
6
7# This function is used to run the research manager
8async def run(query: str):
9    async for chunk in ResearchManager().run(query):
10        yield chunk
11
12
13with gr.Blocks(theme=gr.themes.Default(primary_hue="sky")) as ui:
14    gr.Markdown("# Deep Research")
15    query_textbox = gr.Textbox(label="What topic would you like to research?")
16    run_button = gr.Button("Run", variant="primary")
17    report = gr.Markdown(label="Report")
18    
19    run_button.click(fn=run, inputs=query_textbox, outputs=report)
20    query_textbox.submit(fn=run, inputs=query_textbox, outputs=report)
21
22ui.launch(inbrowser=True)
23
24