dylanplummer commited on
Commit
0e66fd7
·
verified ·
1 Parent(s): 17674f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -423,10 +423,16 @@ def inference(in_video, stream_url, start_time, end_time, beep_detection_on, eve
423
  self_pct_err = 0
424
  total_confidence = confidence * (1 - self_pct_err)
425
 
426
- if both_feet:
427
- count_msg = f"## Reps Count (both feet): {count_pred:.1f}, Marks Count (both feet): {marks_count_pred:.1f}, Confidence: {total_confidence:.2f}"
 
 
 
428
  else:
429
- count_msg = f"## Reps Count (one foot): {count_pred:.1f}, Marks Count (one foot): {marks_count_pred:.1f}, Confidence: {total_confidence:.2f}"
 
 
 
430
 
431
  if api_call:
432
  if CACHE_API_CALLS:
@@ -638,7 +644,7 @@ with gr.Blocks() as demo:
638
  outputs=[period_length], api_name='inference')
639
  examples = [
640
  #['https://hiemdall-dev2.azurewebsites.net/api/clip/clp_vrpWTyjM/mp4', '00:00:00', '00:01:10', True, 60],
641
- ['files/wc2023.mp4', '', '00:00:00', '', True, 30, False, '', '0.2'],
642
  #['https://hiemdall-dev2.azurewebsites.net/api/playlist/rec_rd2FAyUo/vod', '01:24:22', '01:25:35', True, 60]
643
  #['https://hiemdall-dev2.azurewebsites.net/api/playlist/rec_PY5Ukaua/vod, '00:52:53', '00:55:00', True, 120]
644
  ]
 
423
  self_pct_err = 0
424
  total_confidence = confidence * (1 - self_pct_err)
425
 
426
+ if LOCAL:
427
+ if both_feet:
428
+ count_msg = f"## Reps Count (both feet): {count_pred:.1f}, Marks Count (both feet): {marks_count_pred:.1f}, Confidence: {total_confidence:.2f}"
429
+ else:
430
+ count_msg = f"## Reps Count (one foot): {count_pred:.1f}, Marks Count (one foot): {marks_count_pred:.1f}, Confidence: {total_confidence:.2f}"
431
  else:
432
+ if both_feet:
433
+ count_msg = f"## Reps Count (both feet): {count_pred:.1f}, Confidence: {total_confidence:.2f}"
434
+ else:
435
+ count_msg = f"## Reps Count (one foot): {count_pred:.1f}, Confidence: {total_confidence:.2f}"
436
 
437
  if api_call:
438
  if CACHE_API_CALLS:
 
644
  outputs=[period_length], api_name='inference')
645
  examples = [
646
  #['https://hiemdall-dev2.azurewebsites.net/api/clip/clp_vrpWTyjM/mp4', '00:00:00', '00:01:10', True, 60],
647
+ ['files/wc2023.mp4', '', '00:00:00', '', True, 30, False, '30', '0.2'],
648
  #['https://hiemdall-dev2.azurewebsites.net/api/playlist/rec_rd2FAyUo/vod', '01:24:22', '01:25:35', True, 60]
649
  #['https://hiemdall-dev2.azurewebsites.net/api/playlist/rec_PY5Ukaua/vod, '00:52:53', '00:55:00', True, 120]
650
  ]