Afrinetwork7
commited on
Commit
•
23b21ed
1
Parent(s):
736fcb8
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import math
|
|
4 |
import tempfile
|
5 |
import time
|
6 |
from typing import Optional, Tuple
|
|
|
7 |
|
8 |
import fastapi
|
9 |
import jax.numpy as jnp
|
@@ -103,7 +104,7 @@ def transcribe_youtube(
|
|
103 |
text, runtime = _tqdm_generate(inputs, task=task, return_timestamps=return_timestamps)
|
104 |
return html_embed_str, text, runtime
|
105 |
|
106 |
-
def _tqdm_generate(inputs: dict, task: str, return_timestamps: bool
|
107 |
inputs_len = inputs["array"].shape[0]
|
108 |
all_chunk_start_idx = np.arange(0, inputs_len, step)
|
109 |
num_samples = len(all_chunk_start_idx)
|
|
|
4 |
import tempfile
|
5 |
import time
|
6 |
from typing import Optional, Tuple
|
7 |
+
import os
|
8 |
|
9 |
import fastapi
|
10 |
import jax.numpy as jnp
|
|
|
104 |
text, runtime = _tqdm_generate(inputs, task=task, return_timestamps=return_timestamps)
|
105 |
return html_embed_str, text, runtime
|
106 |
|
107 |
+
def _tqdm_generate(inputs: dict, task: str, return_timestamps: bool):
|
108 |
inputs_len = inputs["array"].shape[0]
|
109 |
all_chunk_start_idx = np.arange(0, inputs_len, step)
|
110 |
num_samples = len(all_chunk_start_idx)
|