Update app.py
Browse files
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 |
-
|
|
|
|
| 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"""
|