Spaces:
Runtime error
Runtime error
Commit
·
90f7ec7
1
Parent(s):
d5b043a
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ def translate_or_transcribe(audio, task):
|
|
15 |
return whisper(audio, None, task, fn_index=0)
|
16 |
|
17 |
def get_response_from_chatbot(text):
|
18 |
-
|
|
|
19 |
|
20 |
def chat(message, chat_history):
|
21 |
out_chat = []
|
@@ -118,7 +119,7 @@ with gr.Blocks(title='Talk to catGPT') as demo:
|
|
118 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
119 |
with gr.Box():
|
120 |
with gr.Row():
|
121 |
-
start_button = gr.Button("Let's talk to
|
122 |
start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
|
123 |
|
124 |
with gr.Group(elem_id="page_2", visible=False) as page_2:
|
|
|
15 |
return whisper(audio, None, task, fn_index=0)
|
16 |
|
17 |
def get_response_from_chatbot(text):
|
18 |
+
cohere_chat_res = co.chat(text, session_id=conv_session_id)
|
19 |
+
return cohere_chat_res.reply
|
20 |
|
21 |
def chat(message, chat_history):
|
22 |
out_chat = []
|
|
|
119 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
120 |
with gr.Box():
|
121 |
with gr.Row():
|
122 |
+
start_button = gr.Button("Let's talk to catGPT!", elem_id="start-btn", visible=True)
|
123 |
start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
|
124 |
|
125 |
with gr.Group(elem_id="page_2", visible=False) as page_2:
|