Spaces:
Running
on
Zero
Running
on
Zero
dongyh20
commited on
Commit
·
fb32aea
1
Parent(s):
7f4e0db
update space
Browse files
app.py
CHANGED
|
@@ -153,11 +153,15 @@ def extract_audio(videos_file_path):
|
|
| 153 |
|
| 154 |
@spaces.GPU(duration=120)
|
| 155 |
def ola_inference(multimodal, audio_path):
|
| 156 |
-
|
| 157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
modality = "video"
|
| 159 |
visual = f"{cur_dir}/case/case1.mp4"
|
| 160 |
-
if visual.endswith(".mp4"):
|
| 161 |
modality = "video"
|
| 162 |
elif visual:
|
| 163 |
modality = "image"
|
|
|
|
| 153 |
|
| 154 |
@spaces.GPU(duration=120)
|
| 155 |
def ola_inference(multimodal, audio_path):
|
| 156 |
+
try:
|
| 157 |
+
visual = multimodal["files"][0]
|
| 158 |
+
except:
|
| 159 |
+
visual = None
|
| 160 |
+
text = multimodal["text"]
|
| 161 |
+
if visual and visual.endswith("image2.png"):
|
| 162 |
modality = "video"
|
| 163 |
visual = f"{cur_dir}/case/case1.mp4"
|
| 164 |
+
if visual and visual.endswith(".mp4"):
|
| 165 |
modality = "video"
|
| 166 |
elif visual:
|
| 167 |
modality = "image"
|