Upload app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ from pathlib import Path
|
|
13 |
import subprocess
|
14 |
|
15 |
# Run the training script
|
|
|
16 |
#subprocess.run(["python", "train.py"])
|
17 |
#print('done!')
|
18 |
|
@@ -59,12 +60,12 @@ model_output = gr.Label(label="charges")
|
|
59 |
def predict_insurance_charges(age, bmi, children, sex, smoker, region):
|
60 |
|
61 |
sample = {
|
62 |
-
'
|
63 |
-
'
|
64 |
-
'
|
65 |
-
'
|
66 |
-
'
|
67 |
-
'
|
68 |
}
|
69 |
|
70 |
data_point = pd.DataFrame([sample])
|
@@ -106,5 +107,5 @@ gr_interface = gr.Interface(
|
|
106 |
gr_interface.queue()
|
107 |
gr_interface.launch(share=False)
|
108 |
|
109 |
-
|
110 |
|
|
|
13 |
import subprocess
|
14 |
|
15 |
# Run the training script
|
16 |
+
#print('*** Running train.py ***')
|
17 |
#subprocess.run(["python", "train.py"])
|
18 |
#print('done!')
|
19 |
|
|
|
60 |
def predict_insurance_charges(age, bmi, children, sex, smoker, region):
|
61 |
|
62 |
sample = {
|
63 |
+
'age': age,
|
64 |
+
'bmi': bmi,
|
65 |
+
'children': children,
|
66 |
+
'sex': sex,
|
67 |
+
'smoker': smoker,
|
68 |
+
'region': region
|
69 |
}
|
70 |
|
71 |
data_point = pd.DataFrame([sample])
|
|
|
107 |
gr_interface.queue()
|
108 |
gr_interface.launch(share=False)
|
109 |
|
110 |
+
|
111 |
|