demo_agent / app.py
matuteiglesias's picture
πŸ†• Fresh upload after wipe
93b7bfe verified
raw
history blame
568 Bytes
# 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()