gaur3009 commited on
Commit
a809898
·
verified ·
1 Parent(s): 10fb9ac

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -0
app.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from agents import scout, hypothesis, simulation, publishing, meta_learning
3
+
4
+ def run_pipeline(query):
5
+ papers = scout.search_and_summarize(query)
6
+ titles = [p['title'] for p in papers]
7
+ summaries = [p['summary'] for p in papers]
8
+ hypo = hypothesis.generate(papers)
9
+ sim_result = simulation.simulate(hypo)
10
+ report = publishing.save_report(hypo, sim_result)
11
+ logs = meta_learning.log(hypo, sim_result)
12
+ return titles, summaries, hypo, sim_result, report, logs.to_markdown()
13
+
14
+ with gr.Blocks() as demo:
15
+ gr.Markdown("# 🤖 EurekaCrew: Self‑Evolving AI R&D Lab")
16
+ query_in = gr.Textbox(label="Enter AI research topic")
17
+ run_btn = gr.Button("Run EurekaCrew")
18
+ titles_out = gr.JSON(label="Top matching paper titles")
19
+ summaries_out = gr.JSON(label="Paper summaries")
20
+ hypo_out = gr.Textbox(label="Generated Hypothesis")
21
+ sim_out = gr.Textbox(label="Simulation Result")
22
+ report_out = gr.File(label="Markdown Report")
23
+ logs_out = gr.Markdown(label="Recent Logs")
24
+
25
+ run_btn.click(run_pipeline, inputs=[query_in],
26
+ outputs=[titles_out, summaries_out, hypo_out, sim_out, report_out, logs_out])
27
+
28
+ if __name__ == "__main__":
29
+ demo.launch()