github-actions[bot] commited on
Commit
7e760f6
·
1 Parent(s): 363a3d0

Sync with https://github.com/mozilla-ai/speech-to-text-finetune

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -2,6 +2,7 @@ import os
2
  from pathlib import Path
3
  from typing import Tuple
4
  import gradio as gr
 
5
  from transformers import pipeline, Pipeline
6
  from huggingface_hub import repo_exists
7
 
@@ -75,6 +76,7 @@ def load_model(
75
  )
76
 
77
 
 
78
  def transcribe(pipe: Pipeline, audio: gr.Audio) -> str:
79
  text = pipe(audio)["text"]
80
  return text
 
2
  from pathlib import Path
3
  from typing import Tuple
4
  import gradio as gr
5
+ import spaces
6
  from transformers import pipeline, Pipeline
7
  from huggingface_hub import repo_exists
8
 
 
76
  )
77
 
78
 
79
+ @spaces.GPU
80
  def transcribe(pipe: Pipeline, audio: gr.Audio) -> str:
81
  text = pipe(audio)["text"]
82
  return text