ovieyra21 commited on
Commit
6e2f126
1 Parent(s): 70a7607

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -2,7 +2,10 @@ import os
2
  import gradio as gr
3
  import torch
4
  from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
 
5
  from huggingface_hub import login
 
 
6
 
7
  # Obtener el token desde las variables de entorno
8
  hf_token = os.getenv("HF_TOKEN")
@@ -12,6 +15,9 @@ if hf_token is None:
12
  # Ingresar el token
13
  login(hf_token)
14
 
 
 
 
15
  # Intentar cargar el modelo
16
 
17
  # Load model directly
 
2
  import gradio as gr
3
  import torch
4
  from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
5
+ from transformers import AutoProcessor, AutoModelForTextToSpectrogram
6
  from huggingface_hub import login
7
+ from transformers import pipeline
8
+
9
 
10
  # Obtener el token desde las variables de entorno
11
  hf_token = os.getenv("HF_TOKEN")
 
15
  # Ingresar el token
16
  login(hf_token)
17
 
18
+ pipe = pipeline("text-to-speech", model="ovieyra21/es_speecht5_tts_mabama")
19
+
20
+
21
  # Intentar cargar el modelo
22
 
23
  # Load model directly