Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -139,12 +139,16 @@ def create_interface():
|
|
| 139 |
with gr.TabItem("X-ray Analysis"):
|
| 140 |
img_input = gr.Image(label="Upload Chest X-ray", type="pil")
|
| 141 |
summary_output = gr.HTML(label="Summary Result")
|
| 142 |
-
gr.
|
|
|
|
|
|
|
| 143 |
|
| 144 |
with gr.TabItem("Report Analysis"):
|
| 145 |
pdf_input = gr.File(label="Upload PDF Report", file_types=[".pdf"])
|
| 146 |
summary_output_report = gr.Textbox(label="Summary Result", lines=5)
|
| 147 |
-
gr.
|
|
|
|
|
|
|
| 148 |
|
| 149 |
return demo
|
| 150 |
|
|
|
|
| 139 |
with gr.TabItem("X-ray Analysis"):
|
| 140 |
img_input = gr.Image(label="Upload Chest X-ray", type="pil")
|
| 141 |
summary_output = gr.HTML(label="Summary Result")
|
| 142 |
+
with gr.Row():
|
| 143 |
+
gr.Button("Analyze X-ray", elem_id="analyze_button", scale=0.3).click(predict_xray, inputs=img_input, outputs=summary_output)
|
| 144 |
+
gr.Button("Clear", elem_id="clear_button", scale=0.3).click(lambda: [None, ""], inputs=None, outputs=[img_input, summary_output])
|
| 145 |
|
| 146 |
with gr.TabItem("Report Analysis"):
|
| 147 |
pdf_input = gr.File(label="Upload PDF Report", file_types=[".pdf"])
|
| 148 |
summary_output_report = gr.Textbox(label="Summary Result", lines=5)
|
| 149 |
+
with gr.Row():
|
| 150 |
+
gr.Button("Analyze Report", elem_id="analyze_button", scale=0.3).click(analyze_report, inputs=pdf_input, outputs=summary_output_report)
|
| 151 |
+
gr.Button("Clear", elem_id="clear_button", scale=0.3).click(lambda: [None, ""], inputs=None, outputs=[pdf_input, summary_output_report])
|
| 152 |
|
| 153 |
return demo
|
| 154 |
|