Marcos12886 commited on
Commit
cc3562b
1 Parent(s): 6e7e28a

Update app.py

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