Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
import gradio as gr
|
7 |
import pytube as pt
|
8 |
import spaces
|
9 |
-
from transformers import AutoTokenizer, WhisperForConditionalGeneration, WhisperProcessor, pipeline
|
10 |
from huggingface_hub import model_info
|
11 |
try:
|
12 |
import flash_attn
|
@@ -34,6 +34,7 @@ def pipe(file, return_timestamps=False):
|
|
34 |
task="automatic-speech-recognition",
|
35 |
model=model,
|
36 |
tokenizer=AutoTokenizer.from_pretrained(MODEL_NAME),
|
|
|
37 |
chunk_length_s=30,
|
38 |
device=device,
|
39 |
token=auth_token,
|
|
|
6 |
import gradio as gr
|
7 |
import pytube as pt
|
8 |
import spaces
|
9 |
+
from transformers import AutoFeatureExtractor, AutoTokenizer, WhisperForConditionalGeneration, WhisperProcessor, pipeline
|
10 |
from huggingface_hub import model_info
|
11 |
try:
|
12 |
import flash_attn
|
|
|
34 |
task="automatic-speech-recognition",
|
35 |
model=model,
|
36 |
tokenizer=AutoTokenizer.from_pretrained(MODEL_NAME),
|
37 |
+
feature_extractor=AutoFeatureExtractor.from_pretrained(MODEL_NAME),
|
38 |
chunk_length_s=30,
|
39 |
device=device,
|
40 |
token=auth_token,
|