oyemade commited on
Commit
14dbeb8
1 Parent(s): 0895c19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import numpy as np
3
  import torch
@@ -35,7 +36,8 @@ def synthesise(text):
35
  inputs = processor(text=text, return_tensors="pt")
36
  speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
37
  return speech.cpu()
38
-
 
39
  def speech_to_speech_translation(audio):
40
  # print(model)
41
  translated_text = translate(model, audio)
 
1
+ import spaces
2
  import gradio as gr
3
  import numpy as np
4
  import torch
 
36
  inputs = processor(text=text, return_tensors="pt")
37
  speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
38
  return speech.cpu()
39
+
40
+ @spaces.GPU
41
  def speech_to_speech_translation(audio):
42
  # print(model)
43
  translated_text = translate(model, audio)