Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,11 @@ import torch
|
|
6 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer, pipeline
|
7 |
import numpy as np
|
8 |
|
|
|
|
|
|
|
|
|
|
|
9 |
# set up transcription pipeline
|
10 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
11 |
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-base.en", device=device)
|
|
|
6 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer, pipeline
|
7 |
import numpy as np
|
8 |
|
9 |
+
|
10 |
+
auth_token = os.environ.get("key")
|
11 |
+
os.environ["HUGGING_FACE_HUB_TOKEN"] = auth_token
|
12 |
+
|
13 |
+
|
14 |
# set up transcription pipeline
|
15 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
16 |
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-base.en", device=device)
|