File size: 642 Bytes
6798e8f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
from agent import generate_report

def run_agent(topic):
    if not topic or not topic.strip():
        return "", "Please enter a valid topic."

    # indicate in-progress state with status message
    output_text = generate_report(topic)
    return output_text, "Completed"

ui = gr.Interface(
    fn=run_agent,
    inputs=gr.Textbox(placeholder="Enter any topic...", label="Research Topic"),
    outputs=[gr.Markdown(label="Research Report"), gr.Textbox(label="Status", interactive=False)],
    title="AI Research & Report Agent",
    description="Enter a topic and get a full research report instantly"
)

ui.launch()