KingNish commited on
Commit
3549904
1 Parent(s): aa31cd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
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
- raise ValueError(
54
- "Unsupported media type. Please upload an image or video."
55
- )
56
- else: # If it's a blob
57
- media_path, media_type = identify_and_save_blob(media_input)
 
 
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