oddadmix commited on
Commit
921fc96
·
verified ·
1 Parent(s): bcf254b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  from unsloth import FastModel, FastLanguageModel
3
  import torch
@@ -27,6 +28,7 @@ def load_model():
27
  FastLanguageModel.for_inference(model)
28
  print("Model loaded successfully!")
29
 
 
30
  def transcribe_audio(audio_path, max_tokens=128):
31
  """Transcribe audio file using the loaded model"""
32
  if model is None or processor is None:
 
1
+ import spaces
2
  import gradio as gr
3
  from unsloth import FastModel, FastLanguageModel
4
  import torch
 
28
  FastLanguageModel.for_inference(model)
29
  print("Model loaded successfully!")
30
 
31
+ @spaces.GPU
32
  def transcribe_audio(audio_path, max_tokens=128):
33
  """Transcribe audio file using the loaded model"""
34
  if model is None or processor is None: