Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
# app.py
|
2 |
import os
|
3 |
import gradio as gr
|
|
|
|
|
4 |
from genesis.pipeline import (
|
5 |
run_literature_review,
|
6 |
run_molecule_lookup,
|
@@ -9,7 +11,8 @@ from genesis.pipeline import (
|
|
9 |
run_image_analysis
|
10 |
)
|
11 |
from genesis.visualization import generate_pathway_graph, generate_funding_network
|
12 |
-
from genesis.utils.pdf_export import
|
|
|
13 |
|
14 |
# Load custom CSS
|
15 |
with open("genesis/static/style.css", "r") as f:
|
@@ -29,7 +32,8 @@ Explore molecules, pathways, funding, literature, and images — with real-time
|
|
29 |
def literature_tab(query):
|
30 |
"""Run literature review (PubMed, ChEMBL, BioPortal, UMLS)"""
|
31 |
summary, citations = run_literature_review(query)
|
32 |
-
pdf_path =
|
|
|
33 |
return summary, citations, pdf_path
|
34 |
|
35 |
def molecule_tab(molecule_name):
|
|
|
1 |
# app.py
|
2 |
import os
|
3 |
import gradio as gr
|
4 |
+
|
5 |
+
|
6 |
from genesis.pipeline import (
|
7 |
run_literature_review,
|
8 |
run_molecule_lookup,
|
|
|
11 |
run_image_analysis
|
12 |
)
|
13 |
from genesis.visualization import generate_pathway_graph, generate_funding_network
|
14 |
+
from genesis.utils.pdf_export import export_report_to_pdf
|
15 |
+
|
16 |
|
17 |
# Load custom CSS
|
18 |
with open("genesis/static/style.css", "r") as f:
|
|
|
32 |
def literature_tab(query):
|
33 |
"""Run literature review (PubMed, ChEMBL, BioPortal, UMLS)"""
|
34 |
summary, citations = run_literature_review(query)
|
35 |
+
pdf_path = export_report_to_pdf("Literature Review", summary, citations, filename="literature_report.pdf")
|
36 |
+
|
37 |
return summary, citations, pdf_path
|
38 |
|
39 |
def molecule_tab(molecule_name):
|