Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
# Load the model directly from Hugging Face Hub | |
tts_pipeline = pipeline("text-to-speech", model="Abhinay45/XTTS-Hindi-finetuned") | |
def text_to_speech(text): | |
speech = tts_pipeline(text) | |
return speech['audio'] | |
# Create a Gradio interface | |
iface = gr.Interface(fn=text_to_speech, | |
inputs="text", | |
outputs="audio", | |
title="Text to Speech") | |
iface.launch() | |