matteocirca commited on
Commit
faf3252
·
1 Parent(s): b384883

Update app

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -15,10 +15,10 @@ model_dir = model.download()
15
  model = joblib.load(model_dir + "/wine_model.pkl")
16
  print("Model downloaded")
17
 
18
- def wine(_type,fixed_acidity,volatile_acidity,citric_acid,residual_sugar,chlorides,free_sulfur_dioxide,total_sulfur_dioxide,density,pH,sulphates,alcohol,quality):
19
  print("Calling function")
20
- df = pd.DataFrame([[_type,fixed_acidity,volatile_acidity,citric_acid,residual_sugar,chlorides,free_sulfur_dioxide,total_sulfur_dioxide,density,pH,sulphates,alcohol,quality]],
21
- columns=['_type','fixed_acidity','volatile_acidity','citric_acid','residual_sugar','chlorides','free_sulfur_dioxide','total_sulfur_dioxide','density','pH','sulphates','alcohol','quality'])
22
  print("Predicting")
23
  print(df)
24
  # 'res' is a list of predictions returned as the label.
@@ -46,7 +46,7 @@ demo = gr.Interface(
46
  gr.Number(value=30.0, label="free_sulfur_dioxide"),
47
  gr.Number(value=115.0, label="total_sulfur_dioxide"),
48
  gr.Number(value=1.0, label="density"),
49
- gr.Number(value=3.0, label="pH"),
50
  gr.Number(value=0.0, label="sulphates"),
51
  gr.Number(value=10.0, label="alcohol")
52
  ],
 
15
  model = joblib.load(model_dir + "/wine_model.pkl")
16
  print("Model downloaded")
17
 
18
+ def wine(_type,fixed_acidity,volatile_acidity,citric_acid,residual_sugar,chlorides,free_sulfur_dioxide,total_sulfur_dioxide,density,ph,sulphates,alcohol,quality):
19
  print("Calling function")
20
+ df = pd.DataFrame([[_type,fixed_acidity,volatile_acidity,citric_acid,residual_sugar,chlorides,free_sulfur_dioxide,total_sulfur_dioxide,density,ph,sulphates,alcohol,quality]],
21
+ columns=['_type','fixed_acidity','volatile_acidity','citric_acid','residual_sugar','chlorides','free_sulfur_dioxide','total_sulfur_dioxide','density','ph','sulphates','alcohol','quality'])
22
  print("Predicting")
23
  print(df)
24
  # 'res' is a list of predictions returned as the label.
 
46
  gr.Number(value=30.0, label="free_sulfur_dioxide"),
47
  gr.Number(value=115.0, label="total_sulfur_dioxide"),
48
  gr.Number(value=1.0, label="density"),
49
+ gr.Number(value=3.0, label="ph"),
50
  gr.Number(value=0.0, label="sulphates"),
51
  gr.Number(value=10.0, label="alcohol")
52
  ],