Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -635,7 +635,7 @@ def tgt_manual(t,p,h,pl,tm):
|
|
| 635 |
return "TAT:"+str(t)+" PF1.2:"+str(p)+chr(10)+"Hemo:"+str(h)+" Plt:"+str(pl)+chr(10)+"RESULT: "+("HIGH RISK" if risk>=3 else "MODERATE" if risk>=2 else "LOW RISK")
|
| 636 |
|
| 637 |
# ββ UI βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 638 |
-
with gr.Blocks(title="CardioLab AI - SJSU"
|
| 639 |
gr.HTML(HEADER)
|
| 640 |
|
| 641 |
papers_count = len(set(m["paper"] for m in METADATA)) if PAPERS_LOADED else 0
|
|
@@ -770,7 +770,7 @@ with gr.Blocks(title="CardioLab AI - SJSU", css=CSS) as demo:
|
|
| 770 |
label="Specific Parameters", lines=2)
|
| 771 |
proto_btn = gr.Button("Generate Protocol", variant="primary")
|
| 772 |
with gr.Column(scale=2):
|
| 773 |
-
proto_output = gr.Textbox(label="Generated Protocol", lines=28
|
| 774 |
proto_btn.click(generate_protocol, inputs=[proto_type, proto_params], outputs=proto_output)
|
| 775 |
|
| 776 |
with gr.Tab("Report Writer"):
|
|
@@ -790,7 +790,7 @@ with gr.Blocks(title="CardioLab AI - SJSU", css=CSS) as demo:
|
|
| 790 |
label="Your Results", lines=2)
|
| 791 |
report_btn = gr.Button("Generate Report", variant="primary")
|
| 792 |
with gr.Column(scale=2):
|
| 793 |
-
report_output = gr.Textbox(label="Generated Report", lines=28
|
| 794 |
report_btn.click(generate_report, inputs=[report_desc, report_exp, report_results], outputs=report_output)
|
| 795 |
|
| 796 |
with gr.Tab("Hypothesis Generator"):
|
|
@@ -809,10 +809,10 @@ with gr.Blocks(title="CardioLab AI - SJSU", css=CSS) as demo:
|
|
| 809 |
label="Current Findings", lines=3)
|
| 810 |
hyp_btn = gr.Button("Generate Hypotheses", variant="primary")
|
| 811 |
with gr.Column(scale=2):
|
| 812 |
-
hyp_output = gr.Textbox(label="Research Hypotheses", lines=25
|
| 813 |
hyp_btn.click(generate_hypothesis, inputs=[hyp_area, hyp_findings], outputs=hyp_output)
|
| 814 |
|
| 815 |
gr.HTML("""<div style="text-align:center;padding:10px;border-top:1px solid #e5e7eb;background:#f9fafb;">
|
| 816 |
<span style="color:#9ca3af;font-size:0.75em;">CardioLab AI v38 | SJSU Biomedical Engineering | RAG + Fine-tuned + Phase D | Inspired by <a href="https://github.com/snap-stanford/Biomni" style="color:#c1121f;">Biomni Stanford</a> | Apache 2.0 | $0 Cost</span></div>""")
|
| 817 |
|
| 818 |
-
demo.launch()
|
|
|
|
| 635 |
return "TAT:"+str(t)+" PF1.2:"+str(p)+chr(10)+"Hemo:"+str(h)+" Plt:"+str(pl)+chr(10)+"RESULT: "+("HIGH RISK" if risk>=3 else "MODERATE" if risk>=2 else "LOW RISK")
|
| 636 |
|
| 637 |
# ββ UI βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 638 |
+
with gr.Blocks(title="CardioLab AI - SJSU") as demo:
|
| 639 |
gr.HTML(HEADER)
|
| 640 |
|
| 641 |
papers_count = len(set(m["paper"] for m in METADATA)) if PAPERS_LOADED else 0
|
|
|
|
| 770 |
label="Specific Parameters", lines=2)
|
| 771 |
proto_btn = gr.Button("Generate Protocol", variant="primary")
|
| 772 |
with gr.Column(scale=2):
|
| 773 |
+
proto_output = gr.Textbox(label="Generated Protocol", lines=28)
|
| 774 |
proto_btn.click(generate_protocol, inputs=[proto_type, proto_params], outputs=proto_output)
|
| 775 |
|
| 776 |
with gr.Tab("Report Writer"):
|
|
|
|
| 790 |
label="Your Results", lines=2)
|
| 791 |
report_btn = gr.Button("Generate Report", variant="primary")
|
| 792 |
with gr.Column(scale=2):
|
| 793 |
+
report_output = gr.Textbox(label="Generated Report", lines=28)
|
| 794 |
report_btn.click(generate_report, inputs=[report_desc, report_exp, report_results], outputs=report_output)
|
| 795 |
|
| 796 |
with gr.Tab("Hypothesis Generator"):
|
|
|
|
| 809 |
label="Current Findings", lines=3)
|
| 810 |
hyp_btn = gr.Button("Generate Hypotheses", variant="primary")
|
| 811 |
with gr.Column(scale=2):
|
| 812 |
+
hyp_output = gr.Textbox(label="Research Hypotheses", lines=25)
|
| 813 |
hyp_btn.click(generate_hypothesis, inputs=[hyp_area, hyp_findings], outputs=hyp_output)
|
| 814 |
|
| 815 |
gr.HTML("""<div style="text-align:center;padding:10px;border-top:1px solid #e5e7eb;background:#f9fafb;">
|
| 816 |
<span style="color:#9ca3af;font-size:0.75em;">CardioLab AI v38 | SJSU Biomedical Engineering | RAG + Fine-tuned + Phase D | Inspired by <a href="https://github.com/snap-stanford/Biomni" style="color:#c1121f;">Biomni Stanford</a> | Apache 2.0 | $0 Cost</span></div>""")
|
| 817 |
|
| 818 |
+
demo.launch(css=CSS)
|