Kaushik066 commited on
Commit
d7aeb67
·
verified ·
1 Parent(s): ce5b67a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- #match_idx = torch.argmin(predictions)
290
  st.write(prediction)
291
  st.write(image_paths)
292
 
293
  # Display the results
294
- if prediction[match_idx] >= 0.9:
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")