Rasleen commited on
Commit
817b9ca
Β·
verified Β·
1 Parent(s): 660d3c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -95,19 +95,19 @@ with app_tab:
95
  else:
96
  # st.write("Similarity Scores:", prediction_scores)
97
  for match in matches:
98
- x1, y1, x2, y2 = match['bbox']
99
- name = match['name']
100
- color = (0, 255, 0) if name != "Unknown" else (0, 0, 255)
101
- cv2.rectangle(image_bgr, (x1, y1), (x2, y2), color, 2)
102
- cv2.putText(image_bgr, name, (x1, y2 + 20), cv2.FONT_HERSHEY_SIMPLEX, 0.8, color, 2)
103
-
104
- if name != "Unknown":
105
- # recognized = False
106
- # for score, idx in matches:
107
- # if matched_score >= 0.6:
108
- # matched_name = os.path.basename(image_paths[match_idx]).split('.')[0]
109
- # st.success(f"βœ… Welcome: {matched_name}")
110
- # recognizes=True
111
 
112
  # Send attendance via POST
113
  url = "https://nielit-attendance.glitch.me/adds"
 
95
  else:
96
  # st.write("Similarity Scores:", prediction_scores)
97
  for match in matches:
98
+ x1, y1, x2, y2 = match['bbox']
99
+ name = match['name']
100
+ color = (0, 255, 0) if name != "Unknown" else (0, 0, 255)
101
+ cv2.rectangle(image_bgr, (x1, y1), (x2, y2), color, 2)
102
+ cv2.putText(image_bgr, name, (x1, y2 + 20), cv2.FONT_HERSHEY_SIMPLEX, 0.8, color, 2)
103
+
104
+ if name != "Unknown":
105
+ # recognized = False
106
+ # for score, idx in matches:
107
+ # if matched_score >= 0.6:
108
+ # matched_name = os.path.basename(image_paths[match_idx]).split('.')[0]
109
+ # st.success(f"βœ… Welcome: {matched_name}")
110
+ # recognizes=True
111
 
112
  # Send attendance via POST
113
  url = "https://nielit-attendance.glitch.me/adds"