NEXAS commited on
Commit
5b072a4
·
verified ·
1 Parent(s): d2ebea5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 // 6, img.height // 6))
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: