PRamoneda commited on
Commit
1b24c84
·
1 Parent(s): ff9ad90
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -0
app.py CHANGED
@@ -9,7 +9,7 @@ from huggingface_hub import hf_hub_download
9
  import torch
10
  import sys
11
  import io
12
-
13
 
14
  REPO_ID = "pramoneda/audio"
15
  CACHE_BASE = "models"
@@ -53,7 +53,7 @@ def convert_to_mp3(input_path):
53
  audio.export(temp_audio.name, format="mp3")
54
  return temp_audio.name
55
 
56
-
57
  def process_input(input_file, youtube_url, cookie_file):
58
  # captura consola
59
  captured_output = io.StringIO()
 
9
  import torch
10
  import sys
11
  import io
12
+ import spaces
13
 
14
  REPO_ID = "pramoneda/audio"
15
  CACHE_BASE = "models"
 
53
  audio.export(temp_audio.name, format="mp3")
54
  return temp_audio.name
55
 
56
+ @spaces.GPU
57
  def process_input(input_file, youtube_url, cookie_file):
58
  # captura consola
59
  captured_output = io.StringIO()
requirements.txt CHANGED
@@ -6,6 +6,7 @@ torchaudio==2.4.0
6
 
7
  # hf
8
  huggingface_hub @ git+https://github.com/huggingface/huggingface_hub.git@main
 
9
 
10
  # Gradio moderno y dependencias estables
11
  gradio==4.44.1
 
6
 
7
  # hf
8
  huggingface_hub @ git+https://github.com/huggingface/huggingface_hub.git@main
9
+ spaces==0.36.0
10
 
11
  # Gradio moderno y dependencias estables
12
  gradio==4.44.1