Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
|
5 |
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
+
import torch
|
4 |
+
from transformers import pipeline
|
5 |
+
from datasets import load_dataset
|
6 |
+
|
7 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
8 |
+
|
9 |
+
pipe = pipeline(
|
10 |
+
"automatic-speech-recognition",
|
11 |
+
model="openai/whisper-small",
|
12 |
+
chunk_length_s=30,
|
13 |
+
device=device,
|
14 |
+
)
|
15 |
|
16 |
pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
|
17 |
|