Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -286,12 +286,12 @@ with app_tab:
|
|
| 286 |
# Run the predictions
|
| 287 |
prediction = prod_function(app, image_paths, picture)
|
| 288 |
#predictions = torch.cat(prediction, 0).to(device)
|
| 289 |
-
|
| 290 |
st.write(prediction)
|
| 291 |
st.write(image_paths)
|
| 292 |
|
| 293 |
# Display the results
|
| 294 |
-
if prediction[match_idx] >= 0.
|
| 295 |
st.write('Welcome: ',image_paths[match_idx].split('/')[-1].split('.')[0])
|
| 296 |
else:
|
| 297 |
st.write("Match not found")
|
|
|
|
| 286 |
# Run the predictions
|
| 287 |
prediction = prod_function(app, image_paths, picture)
|
| 288 |
#predictions = torch.cat(prediction, 0).to(device)
|
| 289 |
+
match_idx = torch.argmax(prediction)
|
| 290 |
st.write(prediction)
|
| 291 |
st.write(image_paths)
|
| 292 |
|
| 293 |
# Display the results
|
| 294 |
+
if prediction[match_idx] >= 0.6:
|
| 295 |
st.write('Welcome: ',image_paths[match_idx].split('/')[-1].split('.')[0])
|
| 296 |
else:
|
| 297 |
st.write("Match not found")
|