Spaces:
Sleeping
Sleeping
Niki Zhang
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -932,7 +932,7 @@ async def texttospeech(text,language,autoplay):
|
|
| 932 |
audio_bytes = BytesIO(audio_file.read())
|
| 933 |
audio = base64.b64encode(audio_bytes.read()).decode("utf-8")
|
| 934 |
print("tts....")
|
| 935 |
-
audio_style = 'style="width:
|
| 936 |
if autoplay:
|
| 937 |
audio_player = f'<audio src="data:audio/wav;base64,{audio}" controls autoplay {audio_style}></audio>'
|
| 938 |
else:
|
|
@@ -1100,10 +1100,9 @@ def create_ui():
|
|
| 1100 |
with gr.Column(visible=False) as module_notification_box:
|
| 1101 |
notification_box = gr.Textbox(lines=1, label="Notification", max_lines=5, show_label=False)
|
| 1102 |
|
| 1103 |
-
with gr.Column():
|
| 1104 |
with gr.Column(visible=False,scale=1.0) as modules_need_gpt2:
|
| 1105 |
paragraph_output = gr.Textbox(lines=10, label="Describe Everything", max_lines=10)
|
| 1106 |
-
with gr.Column(visible=False,scale=1.0) as modules_need_gpt0:
|
| 1107 |
cap_everything_button = gr.Button(value="Caption Everything in a Paragraph", interactive=True)
|
| 1108 |
|
| 1109 |
with gr.Column(visible=False) as modules_not_need_gpt2:
|
|
|
|
| 932 |
audio_bytes = BytesIO(audio_file.read())
|
| 933 |
audio = base64.b64encode(audio_bytes.read()).decode("utf-8")
|
| 934 |
print("tts....")
|
| 935 |
+
audio_style = 'style="width:210px;"'
|
| 936 |
if autoplay:
|
| 937 |
audio_player = f'<audio src="data:audio/wav;base64,{audio}" controls autoplay {audio_style}></audio>'
|
| 938 |
else:
|
|
|
|
| 1100 |
with gr.Column(visible=False) as module_notification_box:
|
| 1101 |
notification_box = gr.Textbox(lines=1, label="Notification", max_lines=5, show_label=False)
|
| 1102 |
|
| 1103 |
+
with gr.Column() as modules_need_gpt0:
|
| 1104 |
with gr.Column(visible=False,scale=1.0) as modules_need_gpt2:
|
| 1105 |
paragraph_output = gr.Textbox(lines=10, label="Describe Everything", max_lines=10)
|
|
|
|
| 1106 |
cap_everything_button = gr.Button(value="Caption Everything in a Paragraph", interactive=True)
|
| 1107 |
|
| 1108 |
with gr.Column(visible=False) as modules_not_need_gpt2:
|