Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,9 @@ def run_model():
|
|
| 41 |
|
| 42 |
model_image_to_text = torch.argmax(embeddings_matrix, dim=1)
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
def predict(image):
|
| 47 |
# Save the image to the desired file path
|
|
|
|
| 41 |
|
| 42 |
model_image_to_text = torch.argmax(embeddings_matrix, dim=1)
|
| 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
|