Abdulrahman1989 commited on
Commit
157398f
·
1 Parent(s): 0d4c0d6

Fix the issue

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -42,6 +42,9 @@ class GradioApp:
42
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4") as video_file:
43
  video_file.write(video_data)
44
  video_path = video_file.name
 
 
 
45
 
46
  return initial_image, video_path
47
 
 
42
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4") as video_file:
43
  video_file.write(video_data)
44
  video_path = video_file.name
45
+
46
+ # Convert bytes to a PIL Image for further processing and display
47
+ initial_image = Image.open(io.BytesIO(initial_image_bytes))
48
 
49
  return initial_image, video_path
50