Spaces:
Runtime error
Runtime error
Commit
·
0ea9acb
1
Parent(s):
3ca231d
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,6 @@ p = pipeline("automatic-speech-recognition", "facebook/wav2vec2-base-960h")
|
|
8 |
def user(user_message, history):
|
9 |
return "", history + [[user_message, None]]
|
10 |
|
11 |
-
# def transcribe(audio, state=""):
|
12 |
-
# text = p(audio)["text"]
|
13 |
-
# state += text + " "
|
14 |
-
# return state, state
|
15 |
-
|
16 |
def transcribe(audio):
|
17 |
text = p(audio)["text"]
|
18 |
return text
|
@@ -75,7 +70,7 @@ with gr.Blocks(css=css) as demo:
|
|
75 |
|
76 |
with gr.Box():
|
77 |
|
78 |
-
chatbot = gr.Chatbot([], show_label=False, elem_id="chatbot").style(height="auto")
|
79 |
|
80 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
81 |
with gr.Column(scale=0.8):
|
|
|
8 |
def user(user_message, history):
|
9 |
return "", history + [[user_message, None]]
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
def transcribe(audio):
|
12 |
text = p(audio)["text"]
|
13 |
return text
|
|
|
70 |
|
71 |
with gr.Box():
|
72 |
|
73 |
+
chatbot = gr.Chatbot([], show_label=False, elem_id="chatbot").style(height="auto", color_map=("green", "blue"))
|
74 |
|
75 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
76 |
with gr.Column(scale=0.8):
|