Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ def predict_price(year, month, markets, food):
|
|
| 49 |
prediction = model.predict(input_data)
|
| 50 |
|
| 51 |
food_url = "https://raw.githubusercontent.com/TimiUU/wine/main" + commodity_name[0] + ".png"
|
| 52 |
-
img = Image.open(requests.get(
|
| 53 |
|
| 54 |
|
| 55 |
return prediction, img
|
|
@@ -65,7 +65,7 @@ demo = gr.Interface(
|
|
| 65 |
gr.Dropdown(choices=market, label="Market"),
|
| 66 |
gr.Dropdown(choices=commodity, label="Food Type")
|
| 67 |
],
|
| 68 |
-
outputs=[
|
| 69 |
|
| 70 |
)
|
| 71 |
demo.launch(debug=True)
|
|
|
|
| 49 |
prediction = model.predict(input_data)
|
| 50 |
|
| 51 |
food_url = "https://raw.githubusercontent.com/TimiUU/wine/main" + commodity_name[0] + ".png"
|
| 52 |
+
img = Image.open(requests.get(food_url, stream=True).raw)
|
| 53 |
|
| 54 |
|
| 55 |
return prediction, img
|
|
|
|
| 65 |
gr.Dropdown(choices=market, label="Market"),
|
| 66 |
gr.Dropdown(choices=commodity, label="Food Type")
|
| 67 |
],
|
| 68 |
+
outputs=[gr.Textbox(), gr.Image()]
|
| 69 |
|
| 70 |
)
|
| 71 |
demo.launch(debug=True)
|