Spaces:
Sleeping
Sleeping
PRamoneda
commited on
Commit
·
2161fa2
1
Parent(s):
b30da14
probando
Browse files- app.py +2 -1
- requirements.txt +3 -0
app.py
CHANGED
|
@@ -9,6 +9,7 @@ from huggingface_hub import hf_hub_download
|
|
| 9 |
import torch
|
| 10 |
import sys
|
| 11 |
import io
|
|
|
|
| 12 |
|
| 13 |
REPO_ID = "pramoneda/audio"
|
| 14 |
CACHE_BASE = "models"
|
|
@@ -52,7 +53,7 @@ def convert_to_mp3(input_path):
|
|
| 52 |
audio.export(temp_audio.name, format="mp3")
|
| 53 |
return temp_audio.name
|
| 54 |
|
| 55 |
-
|
| 56 |
def process_input(input_file, youtube_url, cookie_file):
|
| 57 |
# captura consola
|
| 58 |
captured_output = io.StringIO()
|
|
|
|
| 9 |
import torch
|
| 10 |
import sys
|
| 11 |
import io
|
| 12 |
+
from huggingface_hub 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
|
@@ -4,6 +4,9 @@
|
|
| 4 |
torch==2.4.0
|
| 5 |
torchaudio==2.4.0
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
# Gradio moderno y dependencias estables
|
| 8 |
gradio==5.29.1
|
| 9 |
aiofiles==23.2.1 # Fix para conflictos con versiones <25.0
|
|
|
|
| 4 |
torch==2.4.0
|
| 5 |
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==5.29.1
|
| 12 |
aiofiles==23.2.1 # Fix para conflictos con versiones <25.0
|