Spaces:
Sleeping
Sleeping
feat: modify ip to alfred app
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import requests
|
|
5 |
from matplotlib.image import imread
|
6 |
|
7 |
|
8 |
-
ALFRED_URL = "http://
|
9 |
|
10 |
selected_columns = ["ecg_id", "patient_id", "age", "sex", "scp_codes", "report"]
|
11 |
ptbxl_df = pd.read_csv("./res/ptbxl_database.csv")
|
@@ -35,23 +35,13 @@ def get_alfred_from_dataframe(ecg_id):
|
|
35 |
|
36 |
|
37 |
with gr.Blocks() as demo:
|
38 |
-
with gr.Tab("
|
39 |
-
with gr.Row():
|
40 |
-
gr_df = gr.Image(
|
41 |
-
value="./res/example.png",
|
42 |
-
interactive=False,
|
43 |
-
type="filepath",
|
44 |
-
label="This is an example screen. The service is not fully operational yet due to DNS issues. Please wait a moment.",
|
45 |
-
)
|
46 |
-
|
47 |
-
with gr.Tab("Coming Soon"):
|
48 |
with gr.Row():
|
49 |
gr_df = gr.Dataframe(
|
50 |
value=ptbxl_df,
|
51 |
interactive=False,
|
52 |
max_height=200,
|
53 |
label="All PTB-XL v1.3.0 data (https://physionet.org/content/ptb-xl/1.0.3/ptbxl_database.csv). You can refer to the following URL(https://physionet.org/content/ptb-xl/1.0.3/scp_statements.csv) to understand what 'scp_codes' represent.",
|
54 |
-
elem_classes=["scrollable"],
|
55 |
)
|
56 |
|
57 |
with gr.Row():
|
@@ -70,5 +60,14 @@ with gr.Blocks() as demo:
|
|
70 |
ecg_id_output.change(
|
71 |
fn=get_alfred_from_dataframe, inputs=ecg_id_output, outputs=alfred_result
|
72 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
demo.launch()
|
|
|
5 |
from matplotlib.image import imread
|
6 |
|
7 |
|
8 |
+
ALFRED_URL = "http://106.254.240.186:30007"
|
9 |
|
10 |
selected_columns = ["ecg_id", "patient_id", "age", "sex", "scp_codes", "report"]
|
11 |
ptbxl_df = pd.read_csv("./res/ptbxl_database.csv")
|
|
|
35 |
|
36 |
|
37 |
with gr.Blocks() as demo:
|
38 |
+
with gr.Tab("Grand Open"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
with gr.Row():
|
40 |
gr_df = gr.Dataframe(
|
41 |
value=ptbxl_df,
|
42 |
interactive=False,
|
43 |
max_height=200,
|
44 |
label="All PTB-XL v1.3.0 data (https://physionet.org/content/ptb-xl/1.0.3/ptbxl_database.csv). You can refer to the following URL(https://physionet.org/content/ptb-xl/1.0.3/scp_statements.csv) to understand what 'scp_codes' represent.",
|
|
|
45 |
)
|
46 |
|
47 |
with gr.Row():
|
|
|
60 |
ecg_id_output.change(
|
61 |
fn=get_alfred_from_dataframe, inputs=ecg_id_output, outputs=alfred_result
|
62 |
)
|
63 |
+
|
64 |
+
with gr.Tab("Example"):
|
65 |
+
with gr.Row():
|
66 |
+
gr_df = gr.Image(
|
67 |
+
value="./res/example.png",
|
68 |
+
interactive=False,
|
69 |
+
type="filepath",
|
70 |
+
label="This is an example screen. The service is not fully operational yet due to DNS issues. Please wait a moment.",
|
71 |
+
)
|
72 |
|
73 |
demo.launch()
|