Update app.py
Browse files
app.py
CHANGED
@@ -171,7 +171,7 @@ def format_prompt_inputs(image_collection, text_collection, video_collection, us
|
|
171 |
if image_candidates:
|
172 |
image = image_candidates[0]
|
173 |
with PILImage.open(image) as img:
|
174 |
-
img = img.resize((img.width //
|
175 |
img = img.convert("L")
|
176 |
with io.BytesIO() as output:
|
177 |
img.save(output, format="JPEG", quality=60)
|
@@ -251,7 +251,7 @@ def page_2():
|
|
251 |
st.markdown("### Videos")
|
252 |
frame = inputs["frame"]
|
253 |
if frame:
|
254 |
-
video_path = f"StockVideos-CC0/{os.path.basename(frame).split('/')[0]}.mp4"
|
255 |
if os.path.exists(video_path):
|
256 |
st.video(video_path)
|
257 |
else:
|
|
|
171 |
if image_candidates:
|
172 |
image = image_candidates[0]
|
173 |
with PILImage.open(image) as img:
|
174 |
+
img = img.resize((img.width // 2, img.height // 2))
|
175 |
img = img.convert("L")
|
176 |
with io.BytesIO() as output:
|
177 |
img.save(output, format="JPEG", quality=60)
|
|
|
251 |
st.markdown("### Videos")
|
252 |
frame = inputs["frame"]
|
253 |
if frame:
|
254 |
+
video_path = f"video/StockVideos-CC0/{os.path.basename(frame).split('/')[0]}.mp4"
|
255 |
if os.path.exists(video_path):
|
256 |
st.video(video_path)
|
257 |
else:
|