spycoder commited on
Commit
b1ac211
1 Parent(s): aa1c032

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -40,13 +40,7 @@ The model was trained on Thai audio recordings with the following sentences:
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):
@@ -70,6 +64,12 @@ def predict(file_path):
70
  predicted_class_id = torch.argmax(logits, dim=-1).item()
71
 
72
  return predicted_class_id
73
-
 
 
 
 
 
 
74
  iface = gr.Interface(fn=predict, inputs="file", outputs="text")
75
  iface.launch()
 
40
  """
41
 
42
 
43
+
 
 
 
 
 
 
44
 
45
 
46
  def predict(file_path):
 
64
  predicted_class_id = torch.argmax(logits, dim=-1).item()
65
 
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()