ardneebwar commited on
Commit
f80e4ee
1 Parent(s): 5b8a0f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -26,7 +26,7 @@ def classify_audio(filepath):
26
 
27
  title = "🎵 Animal Sound Classifier"
28
  description = """
29
- Animal Sound Classifier model (Fine-tuned "ntu-spml/distilhubert") Dataset: ESC-50 from Github (only the animal sounds)
30
  """
31
 
32
  filenames = ['cat.wav']
@@ -34,10 +34,13 @@ filenames = [f"./{f}" for f in filenames]
34
 
35
  demo = gr.Interface(
36
  fn=classify_audio,
37
- inputs=gr.Audio(type="filepath"),
38
- outputs=[gr.Label(), gr.Number(label="Prediction time (s)")],
39
  title=title,
40
  description=description,
 
 
 
41
  )
42
 
43
  demo.launch()
 
26
 
27
  title = "🎵 Animal Sound Classifier"
28
  description = """
29
+ Animal Sound Classifier model (Fine-tuned "ntu-spml/distilhubert") | Dataset: ESC-50 from Github (only the animal sounds) | Better to use audios 5 seconds long.
30
  """
31
 
32
  filenames = ['cat.wav']
 
34
 
35
  demo = gr.Interface(
36
  fn=classify_audio,
37
+ inputs=gr.Audio(type="filepath", label="Upload your audio file"),
38
+ outputs=[gr.Label(label="Predicted Animal Sound"), gr.Number(label="Prediction time (s)")],
39
  title=title,
40
  description=description,
41
+ theme="huggingface",
42
+ examples=[("cat.wav")],
43
+ live=False
44
  )
45
 
46
  demo.launch()