Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def run_model():
|
|
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
|
@@ -53,7 +53,7 @@ def predict(image):
|
|
53 |
demo = gr.Interface(
|
54 |
fn=predict,
|
55 |
inputs=gr.inputs.Image(),
|
56 |
-
outputs=
|
57 |
)
|
58 |
|
59 |
demo.launch()
|
|
|
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
|
|
|
53 |
demo = gr.Interface(
|
54 |
fn=predict,
|
55 |
inputs=gr.inputs.Image(),
|
56 |
+
outputs=["text", "text"]
|
57 |
)
|
58 |
|
59 |
demo.launch()
|