Spaces:
Paused
Paused
Commit ·
a9546b0
1
Parent(s): 10d36c4
feat(ui): implement suggested UI improvements
Browse files- app/main.py +4 -1
- app/ui/components.py +1 -1
app/main.py
CHANGED
|
@@ -116,6 +116,9 @@ def handle_page_load(username, session_state):
|
|
| 116 |
# Main UI
|
| 117 |
with gr.Blocks(
|
| 118 |
css="""
|
|
|
|
|
|
|
|
|
|
| 119 |
.full-height {height: 100%}
|
| 120 |
|
| 121 |
/* 🤖 AUTOMATION-FRIENDLY CSS */
|
|
@@ -140,7 +143,7 @@ with gr.Blocks(
|
|
| 140 |
const label = el.closest('label');
|
| 141 |
if (label && label.textContent.includes('使用者名稱')) {
|
| 142 |
el.setAttribute('data-testid', 'textbox');
|
| 143 |
-
} else if (label && (label.textContent.includes('
|
| 144 |
el.setAttribute('data-testid', 'textbox');
|
| 145 |
} else if (!el.getAttribute('data-testid')) {
|
| 146 |
el.setAttribute('data-testid', 'textbox');
|
|
|
|
| 116 |
# Main UI
|
| 117 |
with gr.Blocks(
|
| 118 |
css="""
|
| 119 |
+
body {
|
| 120 |
+
--font: 'Optima', 'Candara', 'Noto Sans', 'source-sans-pro', sans-serif;
|
| 121 |
+
}
|
| 122 |
.full-height {height: 100%}
|
| 123 |
|
| 124 |
/* 🤖 AUTOMATION-FRIENDLY CSS */
|
|
|
|
| 143 |
const label = el.closest('label');
|
| 144 |
if (label && label.textContent.includes('使用者名稱')) {
|
| 145 |
el.setAttribute('data-testid', 'textbox');
|
| 146 |
+
} else if (label && (label.textContent.includes('對話輸入區') || label.textContent.includes('prompt'))) {
|
| 147 |
el.setAttribute('data-testid', 'textbox');
|
| 148 |
} else if (!el.getAttribute('data-testid')) {
|
| 149 |
el.setAttribute('data-testid', 'textbox');
|
app/ui/components.py
CHANGED
|
@@ -22,7 +22,7 @@ def create_textbox() -> gr.Textbox:
|
|
| 22 |
def create_prompt_input() -> gr.Textbox:
|
| 23 |
"""Create the user prompt input component."""
|
| 24 |
return gr.Textbox(
|
| 25 |
-
label="用戶
|
| 26 |
submit_btn=True,
|
| 27 |
render=False,
|
| 28 |
scale=1,
|
|
|
|
| 22 |
def create_prompt_input() -> gr.Textbox:
|
| 23 |
"""Create the user prompt input component."""
|
| 24 |
return gr.Textbox(
|
| 25 |
+
label="用戶輸入區",
|
| 26 |
submit_btn=True,
|
| 27 |
render=False,
|
| 28 |
scale=1,
|