nimnim commited on
Commit
0221e35
·
1 Parent(s): c7b62a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -43,14 +43,14 @@ def run_model():
43
 
44
  label_product = text_list[model_image_to_text[0]]
45
 
46
- return label_product, database[label_product]
47
 
48
  def predict(image):
49
  # Save the image to the desired file path
50
  cv2.imwrite(image_paths[0], cv2.cvtColor(image, cv2.COLOR_RGB2BGR))
51
  return run_model()
52
 
53
- demo = iface = gr.Interface(
54
  fn=predict,
55
  inputs=gr.inputs.Image(),
56
  outputs=gr.outputs.Label()
 
43
 
44
  label_product = text_list[model_image_to_text[0]]
45
 
46
+ return database[label_product]
47
 
48
  def predict(image):
49
  # Save the image to the desired file path
50
  cv2.imwrite(image_paths[0], cv2.cvtColor(image, cv2.COLOR_RGB2BGR))
51
  return run_model()
52
 
53
+ demo = gr.Interface(
54
  fn=predict,
55
  inputs=gr.inputs.Image(),
56
  outputs=gr.outputs.Label()