Ant commited on
Commit
8e765bd
1 Parent(s): b68e5c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,6 @@
1
  from transformers import pipeline
 
 
2
 
3
  username = "afern24" ## Complete your username
4
  model_id = f"{username}/distilhubert-finetuned-gtzan"
@@ -21,8 +23,6 @@ def classify_audio(filepath):
21
  pred_time = round(timer() - start_time, 5)
22
  return outputs, pred_time
23
 
24
- import gradio as gr
25
-
26
  demo = gr.Interface(
27
  fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=[gr.Label(label="Predictions"), gr.Number(label="Prediction time (s)")], title="Distilhubert-finetuned-gtzan",
28
  description="Audio classifier based on music genres, for more check out my github ar www.github.com/Ferno22"
 
1
  from transformers import pipeline
2
+ import gradio as gr
3
+ from timeit import default_timer as timer
4
 
5
  username = "afern24" ## Complete your username
6
  model_id = f"{username}/distilhubert-finetuned-gtzan"
 
23
  pred_time = round(timer() - start_time, 5)
24
  return outputs, pred_time
25
 
 
 
26
  demo = gr.Interface(
27
  fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=[gr.Label(label="Predictions"), gr.Number(label="Prediction time (s)")], title="Distilhubert-finetuned-gtzan",
28
  description="Audio classifier based on music genres, for more check out my github ar www.github.com/Ferno22"