Update app.py
Browse files
app.py
CHANGED
|
@@ -113,11 +113,13 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 113 |
|
| 114 |
gpt_response = gr.Video(label="Talking Portrait response", elem_id="video_out")
|
| 115 |
whisper_tr = gr.Textbox(label="whisper english translation", elem_id="text_inp", visible=False)
|
| 116 |
-
|
| 117 |
-
with gr.
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
|
|
|
|
|
|
| 121 |
|
| 122 |
error_handler = gr.HTML(visible=False, show_label=False, elem_id="error_handler")
|
| 123 |
|
|
@@ -126,9 +128,9 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 126 |
with gr.Row():
|
| 127 |
record_input = gr.Audio(source="microphone",type="filepath", label="Audio input", show_label=True, elem_id="record_btn")
|
| 128 |
openai_api_key = gr.Textbox(max_lines=1, type="password", label="Your OpenAI API Key", placeholder="sk-123abc...")
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
|
| 133 |
clean_btn.click(clean_components, inputs=[], outputs=[record_input, error_handler, whisper_tr, gpt_response, clean_btn])
|
| 134 |
send_btn.click(infer, inputs=[record_input, openai_api_key], outputs=[whisper_tr, gpt_response, error_handler, share_group, clean_btn])
|
|
|
|
| 113 |
|
| 114 |
gpt_response = gr.Video(label="Talking Portrait response", elem_id="video_out")
|
| 115 |
whisper_tr = gr.Textbox(label="whisper english translation", elem_id="text_inp", visible=False)
|
| 116 |
+
|
| 117 |
+
with gr.Row():
|
| 118 |
+
clean_btn = gr.Button(value="Clean", visible=False)
|
| 119 |
+
with gr.Group(elem_id="share-btn-container", visible=False) as share_group:
|
| 120 |
+
community_icon = gr.HTML(community_icon_html)
|
| 121 |
+
loading_icon = gr.HTML(loading_icon_html)
|
| 122 |
+
share_button = gr.Button("Share to community", elem_id="share-btn")
|
| 123 |
|
| 124 |
error_handler = gr.HTML(visible=False, show_label=False, elem_id="error_handler")
|
| 125 |
|
|
|
|
| 128 |
with gr.Row():
|
| 129 |
record_input = gr.Audio(source="microphone",type="filepath", label="Audio input", show_label=True, elem_id="record_btn")
|
| 130 |
openai_api_key = gr.Textbox(max_lines=1, type="password", label="Your OpenAI API Key", placeholder="sk-123abc...")
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
send_btn = gr.Button("Send my request !")
|
| 134 |
|
| 135 |
clean_btn.click(clean_components, inputs=[], outputs=[record_input, error_handler, whisper_tr, gpt_response, clean_btn])
|
| 136 |
send_btn.click(infer, inputs=[record_input, openai_api_key], outputs=[whisper_tr, gpt_response, error_handler, share_group, clean_btn])
|