mrfakename commited on
Commit
a73b7f1
1 Parent(s): da5e6b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,8 +8,9 @@ from moviepy.video.tools.subtitles import SubtitlesClip
8
  import torch
9
  import tempfile
10
  import gradio as gr
11
- mdl = whisper.load_model("tiny")
12
 
 
 
13
  def subtitle(input):
14
  input = str(input)
15
  status = "**Starting...**"
 
8
  import torch
9
  import tempfile
10
  import gradio as gr
 
11
 
12
+ mdl = whisper.load_model("base" if torch.cuda.is_available() else 'tiny')
13
+ if torch.cuda.is_available(): mdl.to('cuda')
14
  def subtitle(input):
15
  input = str(input)
16
  status = "**Starting...**"