Spaces:
Sleeping
Sleeping
JadAssaf
commited on
Commit
·
b3558c5
1
Parent(s):
dc45fa4
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,8 @@ loaded_rf_3way = joblib.load("STPI_3WAY_RandomForest.joblib")
|
|
7 |
|
8 |
def STPI(t_0_5_MaxValue,t_1_0_MaxValue,t_2_0_MaxValue,
|
9 |
# Acc_0_5__1_0_MaxValue,
|
10 |
-
Abs_Diff_t_0_5_MaxValue,Abs_Diff_t_1_0_MaxValue,Abs_Diff_t_2_0_MaxValue
|
11 |
print('------------------')
|
12 |
-
print(Optional_Custom_Message)
|
13 |
|
14 |
X = [t_0_5_MaxValue,t_1_0_MaxValue,t_2_0_MaxValue,
|
15 |
# Acc_0_5__1_0_MaxValue,
|
@@ -31,7 +30,6 @@ Abs_Diff_t_0_5_MaxValue,Abs_Diff_t_1_0_MaxValue,Abs_Diff_t_2_0_MaxValue,Optional
|
|
31 |
file_object.write(';')
|
32 |
file_object.write(str(Abs_Diff_t_2_0_MaxValue))
|
33 |
file_object.write(';')
|
34 |
-
file_object.write(Optional_Custom_Message)
|
35 |
file_object.write('\n')
|
36 |
file_object.close()
|
37 |
|
@@ -43,20 +41,20 @@ Abs_Diff_t_0_5_MaxValue,Abs_Diff_t_1_0_MaxValue,Abs_Diff_t_2_0_MaxValue,Optional
|
|
43 |
print('The patient is ', outcome_decoded[int(result_3way)], 'through the 3way method')
|
44 |
# result = 'The 3-way classification resulted in a ', outcome_decoded[int(result_3way)] + ' patient.'
|
45 |
# further_analysis = 'Futher analysis using the 2-way classification resulted in a ' + outcome_decoded[int(result_2way)] + ' label.'
|
46 |
-
return 'The
|
47 |
|
48 |
# result = 'The 2-way classification resulted in a ', outcome_decoded[int(result_2way)] + ' patient.'
|
49 |
# further_analysis = 'Futher analysis using the 3-way classification resulted in a ' + outcome_decoded[int(result_3way)] + ' label.'
|
50 |
|
51 |
-
return 'The
|
52 |
|
53 |
iface = gr.Interface(
|
54 |
fn=STPI,
|
55 |
title='STPI Calculator',
|
56 |
-
description='Calculates the STPI through summarized tomographic parameters. Beta version by Prof. Shady Awwad
|
57 |
inputs=["number", "number","number",
|
58 |
# "number",
|
59 |
-
"number", "number","number"
|
60 |
outputs="text")
|
61 |
iface.launch(share=True)
|
62 |
# %%
|
|
|
7 |
|
8 |
def STPI(t_0_5_MaxValue,t_1_0_MaxValue,t_2_0_MaxValue,
|
9 |
# Acc_0_5__1_0_MaxValue,
|
10 |
+
Abs_Diff_t_0_5_MaxValue,Abs_Diff_t_1_0_MaxValue,Abs_Diff_t_2_0_MaxValue):
|
11 |
print('------------------')
|
|
|
12 |
|
13 |
X = [t_0_5_MaxValue,t_1_0_MaxValue,t_2_0_MaxValue,
|
14 |
# Acc_0_5__1_0_MaxValue,
|
|
|
30 |
file_object.write(';')
|
31 |
file_object.write(str(Abs_Diff_t_2_0_MaxValue))
|
32 |
file_object.write(';')
|
|
|
33 |
file_object.write('\n')
|
34 |
file_object.close()
|
35 |
|
|
|
41 |
print('The patient is ', outcome_decoded[int(result_3way)], 'through the 3way method')
|
42 |
# result = 'The 3-way classification resulted in a ', outcome_decoded[int(result_3way)] + ' patient.'
|
43 |
# further_analysis = 'Futher analysis using the 2-way classification resulted in a ' + outcome_decoded[int(result_2way)] + ' label.'
|
44 |
+
return 'The patient is ' + outcome_decoded[int(result_3way)] + '.'
|
45 |
|
46 |
# result = 'The 2-way classification resulted in a ', outcome_decoded[int(result_2way)] + ' patient.'
|
47 |
# further_analysis = 'Futher analysis using the 3-way classification resulted in a ' + outcome_decoded[int(result_3way)] + ' label.'
|
48 |
|
49 |
+
return 'The patient is ' + outcome_decoded[int(result_2way)] + '.'
|
50 |
|
51 |
iface = gr.Interface(
|
52 |
fn=STPI,
|
53 |
title='STPI Calculator',
|
54 |
+
description='Calculates the STPI through summarized tomographic parameters. Beta version made for Zeimer by Prof. Shady Awwad and Jad Assaf MD.',
|
55 |
inputs=["number", "number","number",
|
56 |
# "number",
|
57 |
+
"number", "number","number"],
|
58 |
outputs="text")
|
59 |
iface.launch(share=True)
|
60 |
# %%
|