Collapseruin commited on
Commit
6d0902b
1 Parent(s): 946312b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -48,7 +48,12 @@ def predict_price(year, month, markets, food):
48
 
49
  prediction = model.predict(input_data)
50
 
51
- return prediction
 
 
 
 
 
52
 
53
 
54
  demo = gr.Interface(
@@ -61,6 +66,7 @@ demo = gr.Interface(
61
  gr.Dropdown(choices=market, label="Market"),
62
  gr.Dropdown(choices=commodity, label="Food Type")
63
  ],
64
- outputs="text"
 
65
  )
66
  demo.launch(debug=True)
 
48
 
49
  prediction = model.predict(input_data)
50
 
51
+ food_url = "https://raw.githubusercontent.com/TimiUU/wine/main" + food + ".png"
52
+ img = Image.open(requests.get(food_url, stream=True).raw)
53
+
54
+ return prediction, img
55
+
56
+ #return prediction, food_url
57
 
58
 
59
  demo = gr.Interface(
 
66
  gr.Dropdown(choices=market, label="Market"),
67
  gr.Dropdown(choices=commodity, label="Food Type")
68
  ],
69
+ outputs=[gr.Textbox(), gr.Image()]
70
+
71
  )
72
  demo.launch(debug=True)