EnYa32 commited on
Commit
5ed82b3
·
verified ·
1 Parent(s): 211ebf2

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +16 -16
src/streamlit_app.py CHANGED
@@ -167,22 +167,22 @@ img96 = pil_img.resize((96, 96)).convert('RGB')
167
  overlay96 = draw_keypoints(img96, pts)
168
  st.image(overlay96, use_container_width=False)
169
 
170
- st.subheader('Keypoints table (x, y)')
171
- # Build a nice table using target_cols order
172
- # target_cols is typically like: ['left_eye_center_x', 'left_eye_center_y', ...]
173
- rows = []
174
- for i in range(0, len(target_cols), 2):
175
- name_x = target_cols[i]
176
- name_y = target_cols[i + 1]
177
- rows.append({
178
- 'keypoint': name_x.replace('_x', ''),
179
- 'x_name': name_x,
180
- 'y_name': name_y,
181
- 'x': float(pred[i]),
182
- 'y': float(pred[i + 1]),
183
- })
184
-
185
- st.dataframe(rows, use_container_width=True)
186
 
187
  else:
188
  st.info('Upload an image to get predictions.')
 
167
  overlay96 = draw_keypoints(img96, pts)
168
  st.image(overlay96, use_container_width=False)
169
 
170
+ st.subheader('Keypoints table (x, y)')
171
+ # Build a nice table using target_cols order
172
+ # target_cols is typically like: ['left_eye_center_x', 'left_eye_center_y', ...]
173
+ rows = []
174
+ for i in range(0, len(target_cols), 2):
175
+ name_x = target_cols[i]
176
+ name_y = target_cols[i + 1]
177
+ rows.append({
178
+ 'keypoint': name_x.replace('_x', ''),
179
+ 'x_name': name_x,
180
+ 'y_name': name_y,
181
+ 'x': float(pred[i]),
182
+ 'y': float(pred[i + 1]),
183
+ })
184
+
185
+ st.dataframe(rows, use_container_width=True)
186
 
187
  else:
188
  st.info('Upload an image to get predictions.')