pktpaulie commited on
Commit
16fe4c6
·
verified ·
1 Parent(s): b3d4a2e

Update app

Browse files

Add PyTorch

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,14 +1,14 @@
1
  from transformers import pipeline
2
- # import torch
3
  import gradio as gr
4
 
5
- # device = "cuda:0" if torch.cuda.is_available() else "cpu"
6
 
7
  pipe = pipeline(
8
  "automatic-speech-recognition",
9
  model="openai/whisper-small.en",
10
  chunk_length_s=30,
11
- # device=device,
12
  )
13
 
14
  # Function to transcribe audio
 
1
  from transformers import pipeline
2
+ import torch
3
  import gradio as gr
4
 
5
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
6
 
7
  pipe = pipeline(
8
  "automatic-speech-recognition",
9
  model="openai/whisper-small.en",
10
  chunk_length_s=30,
11
+ device=device,
12
  )
13
 
14
  # Function to transcribe audio