spycoder commited on
Commit
33a5bcf
1 Parent(s): b1ac211

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -28,14 +28,14 @@ model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
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
 
@@ -66,10 +66,8 @@ def predict(file_path):
66
  return predicted_class_id
67
  gr.Interface(
68
  fn=predict,
69
- inputs="textbox",
70
  outputs="text",
71
  title=title,
72
  description=description,
73
  ).launch()
74
- iface = gr.Interface(fn=predict, inputs="file", outputs="text")
75
- iface.launch()
 
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
+ ชาวไร่ตัดต้นสนทำท่อนซุง\n
32
+ ปูม้าวิ่งไปมาบนใบไม้ (เน้นใช้ริมฝีปาก)\n
33
+ อีกาคอยคาบงูคาบไก่ (เน้นใช้เพดานปาก)\n
34
+ เพียงแค่ฝนตกลงที่หน้าต่างในบางครา\n
35
+ “อาาาาาาาาาาา”\n
36
+ “อีีีีีีีีี”\n
37
+ “อาาาา” (ดังขึ้นเรื่อยๆ)\n
38
+ “อาา อาาา อาาาาา”\n
39
  <img src="https://huggingface.co/spaces/course-demos/Rick_and_Morty_QA/resolve/main/rick.png" width=200px>
40
  """
41
 
 
66
  return predicted_class_id
67
  gr.Interface(
68
  fn=predict,
69
+ inputs="file",
70
  outputs="text",
71
  title=title,
72
  description=description,
73
  ).launch()