Merlintxu commited on
Commit
c5093bb
·
verified ·
1 Parent(s): 7a3d09c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -1,24 +1,21 @@
 
 
 
1
  import gradio as gr
2
- from transformers import pipeline, WhisperProcessor, WhisperForConditionalGeneration
3
  import torch
 
4
  import librosa
5
- import subprocess
6
- from langdetect import detect_langs
7
- import os
8
- import warnings
9
- from transformers import logging
10
  import math
11
  import json
 
 
12
  from pyannote.audio import Pipeline
13
- import numpy as np # Asegúrate de importar numpy
14
 
15
  # Suppress warnings
16
  warnings.filterwarnings("ignore")
17
  logging.set_verbosity_error()
18
 
19
- # Inicializar numpy correctamente
20
- np._import_array()
21
-
22
  # Read the Hugging Face token from the environment variable
23
  HUGGINGFACE_TOKEN = os.getenv("HF_TOKEN")
24
 
 
1
+ import os
2
+ import warnings
3
+ import subprocess
4
  import gradio as gr
 
5
  import torch
6
+ import numpy as np
7
  import librosa
 
 
 
 
 
8
  import math
9
  import json
10
+ from transformers import pipeline, WhisperProcessor, WhisperForConditionalGeneration
11
+ from langdetect import detect_langs
12
  from pyannote.audio import Pipeline
13
+ from transformers import logging
14
 
15
  # Suppress warnings
16
  warnings.filterwarnings("ignore")
17
  logging.set_verbosity_error()
18
 
 
 
 
19
  # Read the Hugging Face token from the environment variable
20
  HUGGINGFACE_TOKEN = os.getenv("HF_TOKEN")
21