Spaces:
Sleeping
Sleeping
File size: 634 Bytes
f7506e5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import gradio as gr
from dotenv import load_dotenv
from research_manager import ResearchManager
load_dotenv(override=True)
async def run(query: str):
async for status_update in ResearchManager().run(query):
yield status_update
with gr.Blocks() as ui:
query_textbox = gr.Textbox(label="What topic would you like to research?")
run_button = gr.Button("Run", variant="primary")
report = gr.Markdown(label="Report")
run_button.click(run, inputs=query_textbox, outputs=report)
query_textbox.submit(run, inputs=query_textbox, outputs=report)
ui.launch(theme=gr.themes.Default(primary_hue="sky"))
|