Update app.py
Browse files
app.py
CHANGED
@@ -23,6 +23,32 @@ model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
|
|
23 |
# if os.path.exists(model_path):
|
24 |
# print(f"Loading saved model {model_path}")
|
25 |
# model.load_state_dict(torch.load(model_path))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
def predict(file_path):
|
27 |
max_length = 100000
|
28 |
|
|
|
23 |
# if os.path.exists(model_path):
|
24 |
# print(f"Loading saved model {model_path}")
|
25 |
# model.load_state_dict(torch.load(model_path))
|
26 |
+
|
27 |
+
|
28 |
+
title = "Upload an mp3 file for parkinsons detection! (Thai Language)"
|
29 |
+
description = """
|
30 |
+
The model was trained on Thai audio recordings with the following sentences:
|
31 |
+
ชาวไร่ตัดต้นสนทำท่อนซุง
|
32 |
+
ปูม้าวิ่งไปมาบนใบไม้ (เน้นใช้ริมฝีปาก)
|
33 |
+
อีกาคอยคาบงูคาบไก่ (เน้นใช้เพดานปาก)
|
34 |
+
เพียงแค่ฝนตกลงที่หน้าต่างในบางครา
|
35 |
+
“อาาาาาาาาาาา”
|
36 |
+
“อีีีีีีีีี”
|
37 |
+
“อาาาา” (ดังขึ้นเรื่อยๆ)
|
38 |
+
“อาา อาาา อาาาาา”
|
39 |
+
<img src="https://huggingface.co/spaces/course-demos/Rick_and_Morty_QA/resolve/main/rick.png" width=200px>
|
40 |
+
"""
|
41 |
+
|
42 |
+
|
43 |
+
gr.Interface(
|
44 |
+
fn=predict,
|
45 |
+
inputs="textbox",
|
46 |
+
outputs="text",
|
47 |
+
title=title,
|
48 |
+
description=description,
|
49 |
+
).launch()
|
50 |
+
|
51 |
+
|
52 |
def predict(file_path):
|
53 |
max_length = 100000
|
54 |
|