| import gradio as gr | |
| from transformers import pipeline | |
| # মডেল লোড করা হচ্ছে | |
| pipe = pipeline("text-to-speech", model=".") | |
| def predict(text): | |
| audio = pipe(text) | |
| return audio["audio"] | |
| # ইন্টারফেস তৈরি | |
| demo = gr.Interface( | |
| fn=predict, | |
| inputs=gr.Textbox(label="আপনার স্ক্রিপ্ট লিখুন"), | |
| outputs=gr.Audio(label="জেনারেটেড ভয়েস"), | |
| title="Ghost AI Voice Hub" | |
| ) | |
| demo.launch() |