Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| def test_function(text): | |
| return f"ทดสอบสำเร็จ! คุณพิมพ์: {text}" | |
| # Simple demo for testing | |
| with gr.Blocks(title="F5-TTS Thai Test") as demo: | |
| gr.Markdown("# 🧪 F5-TTS Thai - Test App") | |
| gr.Markdown("แอปทดสอบเพื่อตรวจสอบว่า Hugging Face Spaces ทำงานได้") | |
| with gr.Row(): | |
| input_text = gr.Textbox(label="ทดสอบการพิมพ์", placeholder="พิมพ์อะไรก็ได้...") | |
| output_text = gr.Textbox(label="ผลลัพธ์") | |
| test_btn = gr.Button("ทดสอบ", variant="primary") | |
| test_btn.click(fn=test_function, inputs=input_text, outputs=output_text) | |
| gr.Markdown(""" | |
| ### ✅ หากแอปนี้ทำงานได้ แสดงว่า: | |
| - Gradio ทำงานได้ปกติ | |
| - โครงสร้างไฟล์ถูกต้อง | |
| - สามารถอัปโหลดแอปหลักได้ | |
| ### 📝 ขั้นตอนต่อไป: | |
| 1. แทนที่ `app_minimal.py` ด้วย `app.py` | |
| 2. อัปโหลดโฟลเดอร์ `src/` | |
| 3. อัปเดต `requirements.txt` | |
| """) | |
| if __name__ == "__main__": | |
| demo.launch() |