PierreBrunelle
commited on
Commit
•
2ca0c6c
1
Parent(s):
9a1ddbd
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ t = pxt.create_table(
|
|
28 |
frames_view = pxt.create_view(
|
29 |
"directory.frames",
|
30 |
t,
|
31 |
-
iterator=FrameIterator.create(video=t.video, fps
|
32 |
)
|
33 |
|
34 |
# Create computed columns to store transformations and persist outputs
|
@@ -85,7 +85,7 @@ def process_and_generate_post(video_file, social_media_type):
|
|
85 |
audio = t.select(t.audio).tail(1)['audio'][0]
|
86 |
|
87 |
# Retrieve thumbnails
|
88 |
-
thumbnails = frames_view.select(frames_view.frame).tail(
|
89 |
|
90 |
# Retrieve Pixeltable Table containing all videos and stored data
|
91 |
df_output = t.collect().to_pandas()
|
@@ -114,7 +114,6 @@ def gradio_interface():
|
|
114 |
<li><strong>AI Integration:</strong> Utilizing OpenAI's GPT and Whisper models for transcription and content generation.</li>
|
115 |
<li><strong>Custom Functions:</strong> Defining user-defined functions (UDFs) for specialized tasks like prompt construction.</li>
|
116 |
<li><strong>Data Persistence:</strong> Storing transformed data and AI outputs for easy retrieval and analysis.</li>
|
117 |
-
<li><strong>Gradio Integration:</strong> Creating an interactive web interface for easy user interaction with Pixeltable's functionalities.</li>
|
118 |
</ul>
|
119 |
"""
|
120 |
)
|
|
|
28 |
frames_view = pxt.create_view(
|
29 |
"directory.frames",
|
30 |
t,
|
31 |
+
iterator=FrameIterator.create(video=t.video, fps=1)
|
32 |
)
|
33 |
|
34 |
# Create computed columns to store transformations and persist outputs
|
|
|
85 |
audio = t.select(t.audio).tail(1)['audio'][0]
|
86 |
|
87 |
# Retrieve thumbnails
|
88 |
+
thumbnails = frames_view.select(frames_view.frame).tail(6)['frame']
|
89 |
|
90 |
# Retrieve Pixeltable Table containing all videos and stored data
|
91 |
df_output = t.collect().to_pandas()
|
|
|
114 |
<li><strong>AI Integration:</strong> Utilizing OpenAI's GPT and Whisper models for transcription and content generation.</li>
|
115 |
<li><strong>Custom Functions:</strong> Defining user-defined functions (UDFs) for specialized tasks like prompt construction.</li>
|
116 |
<li><strong>Data Persistence:</strong> Storing transformed data and AI outputs for easy retrieval and analysis.</li>
|
|
|
117 |
</ul>
|
118 |
"""
|
119 |
)
|