Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=
|
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).
|
74 |
|
75 |
# Retrieve thumbnails
|
76 |
-
thumbnails = frames_view.select(frames_view.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
|