AdithyaSNair commited on
Commit
50bb3e7
·
1 Parent(s): 98ee967

app.py iteration 2

Browse files
Files changed (1) hide show
  1. app.py +22 -25
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 , 404 error'
47
  if large[0] <= 0 and large[1]>0:
48
- return f"The amount to be paid at 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 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 hospital for the mentioned patient is:- {large[1]}"
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
- Polycystic ovary syndrome (PCOS) is a problem with hormones that happens during the reproductive years. If you have PCOS, you may not have periods very often.
65
- Or you may have periods that last many days. You may also have too much of a hormone called androgen in your body.
66
- With PCOS, many small sacs of fluid develop along the outer edge of the ovary. These are called cysts. The small fluid-filled cysts contain immature eggs.
67
- These are called follicles. The follicles fail to regularly release eggs.
68
- The exact cause of PCOS is unknown. Early diagnosis and treatment along with weight loss may lower the risk of long-term complications such as type 2 diabetes and heart disease.
69
-
70
- Output0 - Describes the Prediction made
71
-
72
-
73
- More details about the Inputs taken and how they needed to be taken are given below:
74
- * Pregnancies (number of times pregnant)
75
- * glucose - two-hour plasma glucose concentration after 75g anhydrous glucose in mg/dl (Can check using a Glucometer at home, or at a clinic)
76
- * Blood Pressure (Diastolic Blood Pressure in mmHg)
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)