Marcos12886 commited on
Commit
8798354
·
verified ·
1 Parent(s): 7462ff6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,13 +1,10 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
  import numpy as np
4
- from huggingface_hub import login
5
- from model import SAMPLING_RATE, clasificador, monitor
6
- # modelo = monitor
7
- modelo = clasificador
8
- pipe = pipeline("audio-classification", model=f"A-POR-LOS-8000/distilhubert-finetuned-cry-detector", device="cuda")
9
- token = os.getenv('HF_ACCESS_TOKEN')
10
- login(token, add_to_git_credential=True)
11
 
12
  def transcribe(audio):
13
  _, y = audio
@@ -28,3 +25,4 @@ demo = gr.Interface(
28
  "text",
29
  )
30
  demo.launch()
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
  import numpy as np
4
+ from model import SAMPLING_RATE
5
+ modelo = "mixed-data"
6
+ # modelo = "cry-detector"
7
+ pipe = pipeline("audio-classification", model=f"A-POR-LOS-8000/distilhubert-finetuned-{modelo}")
 
 
 
8
 
9
  def transcribe(audio):
10
  _, y = audio
 
25
  "text",
26
  )
27
  demo.launch()
28
+