Spaces:
Sleeping
Sleeping
refactor: polish alert
Browse files
app.py
CHANGED
@@ -7,6 +7,8 @@ from ast import literal_eval
|
|
7 |
|
8 |
|
9 |
ALFRED_URL = "http://106.254.240.186:30007"
|
|
|
|
|
10 |
|
11 |
selected_columns = ["ecg_id", "patient_id", "age", "sex", "scp_codes", "report"]
|
12 |
ptbxl_df = pd.read_csv("./res/ptbxl_database.csv")
|
@@ -14,6 +16,10 @@ ptbxl_df = ptbxl_df[selected_columns]
|
|
14 |
|
15 |
|
16 |
def get_ecg_id_from_dataframe(df: pd.DataFrame, evt: gr.SelectData):
|
|
|
|
|
|
|
|
|
17 |
return evt.row_value[0]
|
18 |
|
19 |
|
|
|
7 |
|
8 |
|
9 |
ALFRED_URL = "http://106.254.240.186:30007"
|
10 |
+
# ALFRED_URL = "http://192.168.1.11:30007"
|
11 |
+
|
12 |
|
13 |
selected_columns = ["ecg_id", "patient_id", "age", "sex", "scp_codes", "report"]
|
14 |
ptbxl_df = pd.read_csv("./res/ptbxl_database.csv")
|
|
|
16 |
|
17 |
|
18 |
def get_ecg_id_from_dataframe(df: pd.DataFrame, evt: gr.SelectData):
|
19 |
+
gr.Warning(
|
20 |
+
"The analysis of the selected ECG will take about 1 to 2 minutes. Please wait patiently.",
|
21 |
+
duration=15,
|
22 |
+
)
|
23 |
return evt.row_value[0]
|
24 |
|
25 |
|