Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
74a1a54
1
Parent(s):
cbac46a
Load game supports media now?
Browse files
app.py
CHANGED
@@ -255,7 +255,7 @@ def create_media_component(file_path):
|
|
255 |
_, extension = os.path.splitext(file_path)
|
256 |
extension = extension.lower()[1:] # Remove the dot and convert to lowercase
|
257 |
|
258 |
-
if extension in ['jpg', 'jpeg', 'png', 'gif']:
|
259 |
return gr.Image(value=file_path, label="Image Input")
|
260 |
elif extension in ['mp4', 'avi', 'mov']:
|
261 |
return gr.Video(value=file_path, label="Video Input")
|
|
|
255 |
_, extension = os.path.splitext(file_path)
|
256 |
extension = extension.lower()[1:] # Remove the dot and convert to lowercase
|
257 |
|
258 |
+
if extension in ['jpg', 'jpeg', 'png', 'gif', 'webp']:
|
259 |
return gr.Image(value=file_path, label="Image Input")
|
260 |
elif extension in ['mp4', 'avi', 'mov']:
|
261 |
return gr.Video(value=file_path, label="Video Input")
|