yaya-sy commited on
Commit
10a827b
Β·
verified Β·
1 Parent(s): 264bf64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -9,9 +9,11 @@ import cv2
9
  import numpy as np
10
  from PIL import Image
11
  from gradio_client import Client, handle_file
 
12
 
13
- # Initialize TTS client
14
- tts_client = Client("dofbi/galsenai-xtts-v2-wolof-inference")
 
15
 
16
  def tts(text):
17
  """Generate TTS using Gradio API client"""
 
9
  import numpy as np
10
  from PIL import Image
11
  from gradio_client import Client, handle_file
12
+ import os
13
 
14
+ # Initialize TTS client with HF token
15
+ hf_token = os.getenv("HF_TOKEN") # Set your HF token as environment variable
16
+ tts_client = Client("dofbi/galsenai-xtts-v2-wolof-inference", hf_token=hf_token)
17
 
18
  def tts(text):
19
  """Generate TTS using Gradio API client"""