Spaces:
Runtime error
Runtime error
Roland Ding commited on
Commit ·
d31afa8
1
Parent(s): d8c5bc7
2.2.9.26 added text area input to allow users to enter the article text for process by themselves.
Browse files- ui_study.py +11 -9
ui_study.py
CHANGED
|
@@ -8,6 +8,7 @@ from features import *
|
|
| 8 |
def reset():
|
| 9 |
return (
|
| 10 |
gr.Files.update(value=None),
|
|
|
|
| 11 |
gr.Textbox.update(value=""),
|
| 12 |
gr.Textbox.update(value=""),
|
| 13 |
gr.Textbox.update(value=""),
|
|
@@ -25,7 +26,12 @@ with gr.Blocks() as study_page:
|
|
| 25 |
gr.Markdown("## Studies")
|
| 26 |
gr.HTML("<hr>")
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
performance_metric_1 = gr.Textbox(lines=1, label="identify Key Performance Outcome 1",placeholder="e.g. VAS Score")
|
| 31 |
performance_metric_2 = gr.Textbox(lines=1, label="identify Key Performance Outcome 2",placeholder="e.g. Incidence of Fusion")
|
|
@@ -35,12 +41,6 @@ with gr.Blocks() as study_page:
|
|
| 35 |
device_options["secondary extraction"] = gr.Checkbox(label="Will a secondary extraction with device stratification be required?",interactive=True)
|
| 36 |
device_options["secondary extraction count"] = gr.Slider(minimum=0, maximum=10, step=1, label="How many secondary extractions with device stratification be required?",interactive=True)
|
| 37 |
|
| 38 |
-
with gr.Row():
|
| 39 |
-
btn_reset = gr.Button(value="Reset",variant="stop")
|
| 40 |
-
btn_add_study = gr.Button(value="Add",variant="primary")
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
with gr.Column():
|
| 45 |
gr.Markdown("## Literature Report")
|
| 46 |
gr.Markdown("<hr>")
|
|
@@ -60,7 +60,8 @@ with gr.Blocks() as study_page:
|
|
| 60 |
btn_reset.click(
|
| 61 |
reset,
|
| 62 |
outputs=[
|
| 63 |
-
|
|
|
|
| 64 |
performance_metric_1,
|
| 65 |
performance_metric_2,
|
| 66 |
safety_metric_1,
|
|
@@ -76,7 +77,8 @@ with gr.Blocks() as study_page:
|
|
| 76 |
btn_add_study.click(
|
| 77 |
process_study,
|
| 78 |
inputs=[
|
| 79 |
-
|
|
|
|
| 80 |
performance_metric_1,
|
| 81 |
performance_metric_2,
|
| 82 |
safety_metric_1,
|
|
|
|
| 8 |
def reset():
|
| 9 |
return (
|
| 10 |
gr.Files.update(value=None),
|
| 11 |
+
gr.TextArea.update(value=""),
|
| 12 |
gr.Textbox.update(value=""),
|
| 13 |
gr.Textbox.update(value=""),
|
| 14 |
gr.Textbox.update(value=""),
|
|
|
|
| 26 |
gr.Markdown("## Studies")
|
| 27 |
gr.HTML("<hr>")
|
| 28 |
|
| 29 |
+
upload_study = gr.File(label="Upload a clinical study report",type="file")
|
| 30 |
+
input_study = gr.TextArea(label="Or paste a clinical study report content",placeholder="Paste content here...",lines=5)
|
| 31 |
+
|
| 32 |
+
with gr.Row():
|
| 33 |
+
btn_reset = gr.Button(value="Reset",variant="stop")
|
| 34 |
+
btn_add_study = gr.Button(value="Add",variant="primary")
|
| 35 |
|
| 36 |
performance_metric_1 = gr.Textbox(lines=1, label="identify Key Performance Outcome 1",placeholder="e.g. VAS Score")
|
| 37 |
performance_metric_2 = gr.Textbox(lines=1, label="identify Key Performance Outcome 2",placeholder="e.g. Incidence of Fusion")
|
|
|
|
| 41 |
device_options["secondary extraction"] = gr.Checkbox(label="Will a secondary extraction with device stratification be required?",interactive=True)
|
| 42 |
device_options["secondary extraction count"] = gr.Slider(minimum=0, maximum=10, step=1, label="How many secondary extractions with device stratification be required?",interactive=True)
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
with gr.Column():
|
| 45 |
gr.Markdown("## Literature Report")
|
| 46 |
gr.Markdown("<hr>")
|
|
|
|
| 60 |
btn_reset.click(
|
| 61 |
reset,
|
| 62 |
outputs=[
|
| 63 |
+
upload_study,
|
| 64 |
+
input_study,
|
| 65 |
performance_metric_1,
|
| 66 |
performance_metric_2,
|
| 67 |
safety_metric_1,
|
|
|
|
| 77 |
btn_add_study.click(
|
| 78 |
process_study,
|
| 79 |
inputs=[
|
| 80 |
+
upload_study,
|
| 81 |
+
input_study,
|
| 82 |
performance_metric_1,
|
| 83 |
performance_metric_2,
|
| 84 |
safety_metric_1,
|