Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -560,17 +560,19 @@ def get_duration(image_path, audio_path, text, orientation_state, num_steps, ses
|
|
| 560 |
|
| 561 |
return 0
|
| 562 |
|
|
|
|
|
|
|
| 563 |
|
| 564 |
-
|
| 565 |
-
# prompt=text,
|
| 566 |
-
# image_path=image_path,
|
| 567 |
-
# audio_path=audio_path,
|
| 568 |
-
# orientation_state= orientation_state,
|
| 569 |
-
# seq_len=args.seq_len,
|
| 570 |
-
# num_steps=num_steps
|
| 571 |
-
# )
|
| 572 |
|
| 573 |
-
audio_chunks =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 574 |
|
| 575 |
warmup_s = 30
|
| 576 |
duration_s = (20 * num_steps) + warmup_s
|
|
|
|
| 560 |
|
| 561 |
return 0
|
| 562 |
|
| 563 |
+
if session_id is None:
|
| 564 |
+
session_id = uuid.uuid4().hex
|
| 565 |
|
| 566 |
+
limited_audio_path = preprocess_audio_first_5s_librosa(audio_path, True, session_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 567 |
|
| 568 |
+
audio_chunks = inferpipe.get_times(
|
| 569 |
+
prompt=text,
|
| 570 |
+
image_path=image_path,
|
| 571 |
+
audio_path=limited_audio_path,
|
| 572 |
+
orientation_state= orientation_state,
|
| 573 |
+
seq_len=args.seq_len,
|
| 574 |
+
num_steps=num_steps
|
| 575 |
+
)
|
| 576 |
|
| 577 |
warmup_s = 30
|
| 578 |
duration_s = (20 * num_steps) + warmup_s
|