Commit
Β·
f5fc0a3
1
Parent(s):
de072d8
Upload app.py
Browse files
app.py
CHANGED
@@ -172,13 +172,19 @@ def update_tts_method(method):
|
|
172 |
global tts_method
|
173 |
tts_method = method
|
174 |
|
|
|
|
|
|
|
|
|
|
|
175 |
#----------------------------------- Gradio Frontend-----------------------------------
|
176 |
|
177 |
# Gradio Interface
|
178 |
-
|
179 |
-
|
180 |
-
gr.Markdown("
|
181 |
-
gr.Markdown("
|
|
|
182 |
|
183 |
with gr.Row():
|
184 |
with gr.Column():
|
@@ -187,6 +193,10 @@ with gr.Blocks() as app:
|
|
187 |
with gr.Column():
|
188 |
tts_method_switch = gr.Radio(choices=["gTTS", "Custom TTS"], label="Select TTS method", value=tts_method)
|
189 |
tts_method_switch.change(update_tts_method, inputs=[tts_method_switch])
|
|
|
|
|
|
|
|
|
190 |
# with gr.Column():
|
191 |
# sample_voice = gr.Audio(label="Voice Sample to customise assistant's response",sources="microphone")
|
192 |
# customise_voice = gr.Button("Change assistant's voice")
|
|
|
172 |
global tts_method
|
173 |
tts_method = method
|
174 |
|
175 |
+
# Clear button
|
176 |
+
def clear_memory():
|
177 |
+
global memory
|
178 |
+
memory = ""
|
179 |
+
|
180 |
#----------------------------------- Gradio Frontend-----------------------------------
|
181 |
|
182 |
# Gradio Interface
|
183 |
+
#theme="dark"
|
184 |
+
with gr.Blocks(title="Whisper-LLM-TTS") as app:
|
185 |
+
gr.Markdown("## π€ 'Whispering' LLM with a TTS Twist! π")
|
186 |
+
gr.Markdown("π Engage in a not-so-secret chat with an open-source LLM that whispers back!")
|
187 |
+
gr.Markdown("π¨βπ» Crafted with a sprinkle of code magic (and a few cups of coffee) by **@mohcineelharras** β not your average tech wizard!")
|
188 |
|
189 |
with gr.Row():
|
190 |
with gr.Column():
|
|
|
193 |
with gr.Column():
|
194 |
tts_method_switch = gr.Radio(choices=["gTTS", "Custom TTS"], label="Select TTS method", value=tts_method)
|
195 |
tts_method_switch.change(update_tts_method, inputs=[tts_method_switch])
|
196 |
+
with gr.Row():
|
197 |
+
clear_memory_button = gr.Button("Clear Memory")
|
198 |
+
clear_memory_button.click(clear_memory, inputs=[], outputs=[])
|
199 |
+
|
200 |
# with gr.Column():
|
201 |
# sample_voice = gr.Audio(label="Voice Sample to customise assistant's response",sources="microphone")
|
202 |
# customise_voice = gr.Button("Change assistant's voice")
|