Spaces:
Runtime error
Runtime error
Commit
·
9162ed2
1
Parent(s):
f9c0fe7
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def wine(alcohol, chlorides, density, type, volatil_acidity,fixed_acidity, citri
|
|
| 27 |
print("Predicting")
|
| 28 |
print(df)
|
| 29 |
|
| 30 |
-
if type ==
|
| 31 |
res = model_red.predict(df)
|
| 32 |
print(res)
|
| 33 |
wine_url = "https://raw.githubusercontent.com/Anniyuku/wine_quality/main/" + res[0] + ".png"
|
|
@@ -45,7 +45,7 @@ demo = gr.Interface(
|
|
| 45 |
description="Experiment with type, alcohol, chlorides, density, volatil_acidity, fixed_acidity, citric_acid, total_sulfur_dioxide to predict which flower it is.",
|
| 46 |
allow_flagging="never",
|
| 47 |
inputs=[
|
| 48 |
-
gr.inputs.Radio(choices=[
|
| 49 |
gr.inputs.Number(default=9.00, label="alcohol"),
|
| 50 |
gr.inputs.Number(default=0.60, label="chlorides"),
|
| 51 |
gr.inputs.Number(default=1.00, label="density"),
|
|
|
|
| 27 |
print("Predicting")
|
| 28 |
print(df)
|
| 29 |
|
| 30 |
+
if type == 0:
|
| 31 |
res = model_red.predict(df)
|
| 32 |
print(res)
|
| 33 |
wine_url = "https://raw.githubusercontent.com/Anniyuku/wine_quality/main/" + res[0] + ".png"
|
|
|
|
| 45 |
description="Experiment with type, alcohol, chlorides, density, volatil_acidity, fixed_acidity, citric_acid, total_sulfur_dioxide to predict which flower it is.",
|
| 46 |
allow_flagging="never",
|
| 47 |
inputs=[
|
| 48 |
+
gr.inputs.Radio(choices=[0,1], label='Type'),
|
| 49 |
gr.inputs.Number(default=9.00, label="alcohol"),
|
| 50 |
gr.inputs.Number(default=0.60, label="chlorides"),
|
| 51 |
gr.inputs.Number(default=1.00, label="density"),
|