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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,10 +1,13 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
  import numpy as np
 
4
  from model import SAMPLING_RATE, clasificador, monitor
5
  # modelo = monitor
6
  modelo = clasificador
7
  pipe = pipeline("audio-classification", model=f"A-POR-LOS-8000/distilhubert-finetuned-cry-detector", device="cuda")
 
 
8
 
9
  def transcribe(audio):
10
  _, y = audio
 
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