Spaces:
Runtime error
Runtime error
Commit
·
50bb3e7
1
Parent(s):
98ee967
app.py iteration 2
Browse files
app.py
CHANGED
@@ -43,13 +43,13 @@ def main(Age,Sex,BMI,No_of_Children,Smoker,Region):
|
|
43 |
large=[costpredLin,costpredRand]
|
44 |
#large.sort(reverse=True)
|
45 |
if large[0] <= 0 and large[1]<=0:
|
46 |
-
return 'No values found
|
47 |
if large[0] <= 0 and large[1]>0:
|
48 |
-
return f"The amount to be paid at hospital for the mentioned patient is
|
49 |
if large[0] >0 and large[1] <= 0:
|
50 |
-
return f"The amount to be paid at hospital for the mentioned patient is
|
51 |
if large[0] >=0 and large[1] >=0:
|
52 |
-
return f"The amount to be paid at hospital for the mentioned patient is
|
53 |
|
54 |
iface = gr.Interface(fn = main,
|
55 |
|
@@ -60,28 +60,25 @@ outputs =['text'],
|
|
60 |
title="Medical cost prediction ",
|
61 |
|
62 |
description =''' Description
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
* Skin Thickness (Triceps skin fold thickness in mm)
|
78 |
-
* Insulin Resistance (2 h serum insulin in mu U/ml)( Results could be obtained from a Clinic )
|
79 |
-
* BMI (Body Mass Index in kg/m2), BMI can be calculated using the equation = Weight/(Height²)
|
80 |
-
* Age (years)
|
81 |
-
* Pedigree Diabetes Function ('function that represents how likely they are to get the disease by extrapolating from their ancestor’s history )
|
82 |
-
Generally, it's between 0 - 2.5, if there wasn't any ancestorial history of diabetes you can choose between 0 and 1,
|
83 |
-
and if there is any so can select between 1 - 2.5 regarding the seriousness of the family.
|
84 |
''',
|
|
|
|
|
|
|
|
|
85 |
examples=[[19,0,27.9,0,1,3],[32,1,28.9,0,0,1]])
|
86 |
|
87 |
iface.launch(debug =True)
|
|
|
43 |
large=[costpredLin,costpredRand]
|
44 |
#large.sort(reverse=True)
|
45 |
if large[0] <= 0 and large[1]<=0:
|
46 |
+
return 'No values found, 404 error'
|
47 |
if large[0] <= 0 and large[1]>0:
|
48 |
+
return f"The amount to be paid at the hospital for the mentioned patient is- {large[1]}"
|
49 |
if large[0] >0 and large[1] <= 0:
|
50 |
+
return f"The amount to be paid at the hospital for the mentioned patient is- {large[0]}"
|
51 |
if large[0] >=0 and large[1] >=0:
|
52 |
+
return f"The amount to be paid at the hospital for the mentioned patient is- {large[1]}"
|
53 |
|
54 |
iface = gr.Interface(fn = main,
|
55 |
|
|
|
60 |
title="Medical cost prediction ",
|
61 |
|
62 |
description =''' Description
|
63 |
+
|
64 |
+
Age: age of the primary beneficiary
|
65 |
+
|
66 |
+
Sex: insurance contractor gender, female = 0, male = 1
|
67 |
+
|
68 |
+
BMI: Body mass index, providing an understanding of the body, weights that are relatively high or low relative to height,
|
69 |
+
objective index of body weight (kg / m ^ 2) using the ratio of height to weight, ideally 18.5 to 24.9
|
70 |
+
|
71 |
+
No_of_Children: Number of children covered by health insurance / Number of dependents
|
72 |
+
|
73 |
+
Smoker: Smoking (Yes(1)/No(0))
|
74 |
+
|
75 |
+
Region: the beneficiary's residential area in the US, northeast =0, northwest =1, southeast = 2, and southwest = 3
|
76 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
''',
|
78 |
+
article='''
|
79 |
+
🩺 Medical Cost Prediction
|
80 |
+
A regression model that predicts medical cost with an accuracy above 85%
|
81 |
+
'''
|
82 |
examples=[[19,0,27.9,0,1,3],[32,1,28.9,0,0,1]])
|
83 |
|
84 |
iface.launch(debug =True)
|