Spaces:
Paused
Paused
initial input layout fix
Browse files
app.py
CHANGED
|
@@ -168,6 +168,10 @@ with gr.Blocks() as demo:
|
|
| 168 |
text_input = gr.Textbox(lines=2, placeholder="請輸入文字", label="文字輸入")
|
| 169 |
file_audio = gr.Audio(sources=["upload"], type="filepath", label="上傳語音檔案")
|
| 170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
# Set visibility based on selected mode.
|
| 172 |
def update_visibility(selected_mode):
|
| 173 |
if selected_mode == "Microphone":
|
|
|
|
| 168 |
text_input = gr.Textbox(lines=2, placeholder="請輸入文字", label="文字輸入")
|
| 169 |
file_audio = gr.Audio(sources=["upload"], type="filepath", label="上傳語音檔案")
|
| 170 |
|
| 171 |
+
# Initially, only the microphone input is visible.
|
| 172 |
+
text_input.visible = False
|
| 173 |
+
file_audio.visible = False
|
| 174 |
+
|
| 175 |
# Set visibility based on selected mode.
|
| 176 |
def update_visibility(selected_mode):
|
| 177 |
if selected_mode == "Microphone":
|