PierreBrunelle commited on
Commit
ad6db2b
·
verified ·
1 Parent(s): c0d8723

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,7 +27,7 @@ t = pxt.create_table(
27
  frames_view = pxt.create_view(
28
  "directory.frames",
29
  t,
30
- iterator=FrameIterator.create(video=t.video, num_frames=20)
31
  )
32
 
33
  # Create computed columns to store transformations and persist outputs
@@ -70,10 +70,10 @@ def process_and_generate_post(video_file, social_media_type):
70
  }])
71
 
72
  # Retrieve Social media posts
73
- social_media_post = t.select(t.answer).tail(1)['answer'][0]
74
 
75
  # Retrieve thumbnails
76
- thumbnails = frames_view.select(frames_view.frame).tail(4)['frame']
77
 
78
  #Display content
79
  return social_media_post, thumbnails
 
27
  frames_view = pxt.create_view(
28
  "directory.frames",
29
  t,
30
+ iterator=FrameIterator.create(video=t.video, num_frames=2)
31
  )
32
 
33
  # Create computed columns to store transformations and persist outputs
 
70
  }])
71
 
72
  # Retrieve Social media posts
73
+ social_media_post = t.select(t.answer).show()['answer'][0]
74
 
75
  # Retrieve thumbnails
76
+ thumbnails = frames_view.select(frames_view.frame).show(2)['frame']
77
 
78
  #Display content
79
  return social_media_post, thumbnails