File size: 568 Bytes
93b7bfe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# app.py
import gradio as gr
from agent import DemoAgent

agent = DemoAgent(agent_name="demo_agent")

def run_agent(input_text):
    result = agent.run(input_text)
    return result.get("result", "No result returned.")

iface = gr.Interface(
    fn=run_agent,
    inputs=gr.Textbox(lines=5, label="Enter your research question"),
    outputs=gr.Textbox(label="Agent Response"),
    title="Demo Agent: Academic Research Assistant",
    description="Find papers, summarize key findings, and generate research questions."
)

if __name__ == "__main__":
    iface.launch()