puyao commited on
Commit
9336671
·
1 Parent(s): 46e5ea0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(flower_url, stream=True).raw)
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=["text",gr.Image(type="pil")]
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)