File size: 1,351 Bytes
106478e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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()