JackismyShephard commited on
Commit
22f7a69
1 Parent(s): 0641613

fix spelling error and remove redundant argument

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ pipe = pipeline(
13
  )
14
 
15
  def classify_audio(filepath):
16
- preds = pipe(filepath, tok_k = 10)
17
  outputs = {}
18
  for p in preds:
19
  outputs[p["label"]] = p["score"]
@@ -21,7 +21,7 @@ def classify_audio(filepath):
21
 
22
  demo = gr.Interface(
23
  fn=classify_audio,
24
- inputs= gr.Audio(sources=["upload", "microphone"], label="Audio file", type="filepath"),
25
  outputs=gr.Label(),
26
  title="Music Genre Classification",
27
  description=(
 
13
  )
14
 
15
  def classify_audio(filepath):
16
+ preds = pipe(filepath, top_k = 10)
17
  outputs = {}
18
  for p in preds:
19
  outputs[p["label"]] = p["score"]
 
21
 
22
  demo = gr.Interface(
23
  fn=classify_audio,
24
+ inputs= gr.Audio(label="Audio file", type="filepath"),
25
  outputs=gr.Label(),
26
  title="Music Genre Classification",
27
  description=(