Spaces:
Runtime error
Runtime error
Commit
·
f675bf5
1
Parent(s):
5e1dfaf
Remove transcribe option
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ whisper = gr.Interface.load(name="spaces/sanchit-gandhi/whisper-large-v2")
|
|
12 |
|
13 |
|
14 |
def translate_or_transcribe(audio, task):
|
15 |
-
return whisper(audio, None,
|
16 |
|
17 |
def get_response_from_chatbot(text):
|
18 |
cohere_chat_res = co.chat(text, session_id=conv_session_id, persona = "catgpt")
|
@@ -136,7 +136,7 @@ with gr.Blocks(title='Talk to CatGPT') as demo:
|
|
136 |
)
|
137 |
translate_btn = gr.Button("Check Whisper first ? 👍")
|
138 |
|
139 |
-
whisper_task = gr.Radio(["translate", "transcribe"], value="translate", show_label=False)
|
140 |
with gr.Row(elem_id="prompt_row"):
|
141 |
prompt_input = gr.Textbox(lines=2, label="Input text",show_label=True)
|
142 |
chat_history = gr.Textbox(lines=4, label="prompt", visible=False)
|
@@ -149,7 +149,7 @@ with gr.Blocks(title='Talk to CatGPT') as demo:
|
|
149 |
|
150 |
|
151 |
translate_btn.click(fn=translate_or_transcribe,
|
152 |
-
inputs=[prompt_input_audio
|
153 |
outputs=prompt_input
|
154 |
)
|
155 |
|
|
|
12 |
|
13 |
|
14 |
def translate_or_transcribe(audio, task):
|
15 |
+
return whisper(audio, None, "translate", fn_index=0)
|
16 |
|
17 |
def get_response_from_chatbot(text):
|
18 |
cohere_chat_res = co.chat(text, session_id=conv_session_id, persona = "catgpt")
|
|
|
136 |
)
|
137 |
translate_btn = gr.Button("Check Whisper first ? 👍")
|
138 |
|
139 |
+
#whisper_task = gr.Radio(["translate", "transcribe"], value="translate", show_label=False)
|
140 |
with gr.Row(elem_id="prompt_row"):
|
141 |
prompt_input = gr.Textbox(lines=2, label="Input text",show_label=True)
|
142 |
chat_history = gr.Textbox(lines=4, label="prompt", visible=False)
|
|
|
149 |
|
150 |
|
151 |
translate_btn.click(fn=translate_or_transcribe,
|
152 |
+
inputs=[prompt_input_audio],
|
153 |
outputs=prompt_input
|
154 |
)
|
155 |
|