Spaces:
Build error
Build error
Commit
·
135765d
1
Parent(s):
6c11ba9
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from huggingsound import SpeechRecognitionModel
|
3 |
from transformers import pipeline, AutoModelForCTC, Wav2Vec2Processor, Wav2Vec2ProcessorWithLM
|
4 |
|
|
|
5 |
|
6 |
-
def greet(name):
|
7 |
-
return "Hello " + name + "!!"
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
def run(input_file, history, model_size="300M"):
|
18 |
language = "Russian"
|
|
|
1 |
import gradio as gr
|
2 |
+
import logging
|
3 |
from huggingsound import SpeechRecognitionModel
|
4 |
from transformers import pipeline, AutoModelForCTC, Wav2Vec2Processor, Wav2Vec2ProcessorWithLM
|
5 |
|
6 |
+
# COPYPASTED FROM: https://huggingface.co/spaces/jonatasgrosman/asr/blob/main/app.py
|
7 |
|
|
|
|
|
8 |
|
9 |
+
logging.basicConfig(
|
10 |
+
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
|
11 |
+
datefmt="%m/%d/%Y %H:%M:%S",
|
12 |
+
handlers=[logging.StreamHandler(sys.stdout)],
|
13 |
+
)
|
14 |
+
logger = logging.getLogger(__name__)
|
15 |
+
logger.setLevel(logging.DEBUG)
|
16 |
|
17 |
def run(input_file, history, model_size="300M"):
|
18 |
language = "Russian"
|