Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -50,11 +50,13 @@ def qwen_inference(media_input, text_input=None):
|
|
50 |
elif media_path.endswith(video_extensions):
|
51 |
media_type = "video"
|
52 |
else:
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
58 |
|
59 |
print(media_path)
|
60 |
|
|
|
50 |
elif media_path.endswith(video_extensions):
|
51 |
media_type = "video"
|
52 |
else:
|
53 |
+
try:
|
54 |
+
media_path, media_type = identify_and_save_blob(media_input)
|
55 |
+
except:
|
56 |
+
raise ValueError(
|
57 |
+
"Unsupported media type. Please upload an image or video."
|
58 |
+
)
|
59 |
+
|
60 |
|
61 |
print(media_path)
|
62 |
|