Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -193,25 +193,13 @@ example_queries = [
|
|
| 193 |
|
| 194 |
# 自定義 CSS
|
| 195 |
custom_css = """
|
| 196 |
-
body {
|
| 197 |
-
background-color: #1E1E1E;
|
| 198 |
-
color: #E0E0E0;
|
| 199 |
-
}
|
| 200 |
.container {display: flex; flex-direction: row;}
|
| 201 |
.input-column {flex: 1; padding-right: 20px;}
|
| 202 |
.output-column {flex: 2;}
|
| 203 |
.examples-list {display: flex; flex-wrap: wrap; gap: 10px;}
|
| 204 |
.examples-list > * {flex-basis: calc(50% - 5px);}
|
| 205 |
footer {display:none !important}
|
| 206 |
-
.gradio-container {font-size: 16px;
|
| 207 |
-
.gr-button {background-color: #3B3B3B; color: #FFFFFF;}
|
| 208 |
-
.gr-button:hover {background-color: #4B4B4B;}
|
| 209 |
-
.gr-input, .gr-textarea {background-color: #2B2B2B; color: #E0E0E0; border: 1px solid #3B3B3B;}
|
| 210 |
-
.gr-input:focus, .gr-textarea:focus {border-color: #4B4B4B;}
|
| 211 |
-
.gr-form {background-color: #2B2B2B; border: 1px solid #3B3B3B;}
|
| 212 |
-
.gr-box {background-color: #2B2B2B; border: 1px solid #3B3B3B;}
|
| 213 |
-
.gr-padded {background-color: #2B2B2B;}
|
| 214 |
-
.gr-text {color: #E0E0E0;}
|
| 215 |
"""
|
| 216 |
|
| 217 |
# 創建Gradio界面
|
|
@@ -225,6 +213,7 @@ with gr.Blocks(css=custom_css) as iface:
|
|
| 225 |
with gr.Row():
|
| 226 |
submit_btn = gr.Button("查詢", elem_classes=["text-lg"])
|
| 227 |
audio_input = gr.Audio(type="filepath", label="語音輸入")
|
|
|
|
| 228 |
|
| 229 |
gr.Markdown("### 範例查詢", elem_classes=["text-xl"])
|
| 230 |
for i in range(0, len(example_queries), 2):
|
|
|
|
| 193 |
|
| 194 |
# 自定義 CSS
|
| 195 |
custom_css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
.container {display: flex; flex-direction: row;}
|
| 197 |
.input-column {flex: 1; padding-right: 20px;}
|
| 198 |
.output-column {flex: 2;}
|
| 199 |
.examples-list {display: flex; flex-wrap: wrap; gap: 10px;}
|
| 200 |
.examples-list > * {flex-basis: calc(50% - 5px);}
|
| 201 |
footer {display:none !important}
|
| 202 |
+
.gradio-container {font-size: 16px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
"""
|
| 204 |
|
| 205 |
# 創建Gradio界面
|
|
|
|
| 213 |
with gr.Row():
|
| 214 |
submit_btn = gr.Button("查詢", elem_classes=["text-lg"])
|
| 215 |
audio_input = gr.Audio(type="filepath", label="語音輸入")
|
| 216 |
+
#audio_input = gr.Audio(sources="microphone", label="錄音", elem_classes="small-button")
|
| 217 |
|
| 218 |
gr.Markdown("### 範例查詢", elem_classes=["text-xl"])
|
| 219 |
for i in range(0, len(example_queries), 2):
|