Omnibus commited on
Commit
ff8f589
·
1 Parent(s): 76e14c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -41,12 +41,19 @@ def load_video(vid):
41
  msc = float(frame_count/fps)
42
  print (msc)
43
  capture.release()
44
- if round(msc) <=59:
45
- seconds = round(msc)
46
- else:
47
- seconds = 59
48
- minutes = int(msc/60)
49
- hours = int(msc/360)
 
 
 
 
 
 
 
50
  vid_len = f'{hours}:{minutes}:{seconds}'
51
  #vid_len_up = gr.update(label = "End", value = f"{vid_len}", placeholder = "0:00:54")
52
  return frame_count, fps, vid_len
 
41
  msc = float(frame_count/fps)
42
  print (msc)
43
  capture.release()
44
+ vid_t = round(msc)
45
+ if vid_t <=59:
46
+ seconds = vid_t
47
+ minutes = "00"
48
+ hours = "00"
49
+ if vid_t >59 and vid_t <=359:
50
+
51
+ if vid_t >59 and vid_t<=360:minutes = (vid_t/60)
52
+ hours = int(vid_t/360)
53
+ minutes = int(vid_t/60)-(hours*360)
54
+ seconds = vid_t-(minutes*60)-(hours*360)
55
+
56
+
57
  vid_len = f'{hours}:{minutes}:{seconds}'
58
  #vid_len_up = gr.update(label = "End", value = f"{vid_len}", placeholder = "0:00:54")
59
  return frame_count, fps, vid_len