Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -619,8 +619,10 @@ def infer_example(image_path, audio_path, text, num_steps, raw_image_path, sessi
|
|
| 619 |
if session_id is None:
|
| 620 |
session_id = uuid.uuid4().hex
|
| 621 |
|
|
|
|
|
|
|
| 622 |
image_path, _ = preprocess_img(image_path, image_path, [[720, 400]], session_id)
|
| 623 |
-
result = infer(image_path,
|
| 624 |
|
| 625 |
return result
|
| 626 |
|
|
|
|
| 619 |
if session_id is None:
|
| 620 |
session_id = uuid.uuid4().hex
|
| 621 |
|
| 622 |
+
limited_audio_path = preprocess_audio_first_5s_librosa(audio_path, True, session_id)
|
| 623 |
+
|
| 624 |
image_path, _ = preprocess_img(image_path, image_path, [[720, 400]], session_id)
|
| 625 |
+
result = infer(image_path, limited_audio_path, text, [[720, 400]], num_steps, session_id, progress)
|
| 626 |
|
| 627 |
return result
|
| 628 |
|