Spaces:
Sleeping
Sleeping
ใ
ใ
ใ
commited on
Commit ยท
18b03df
1
Parent(s): 579a2a7
Fix: Apply CSS in Blocks constructor and improve selectors - Move CSS from launch() to Blocks constructor (official pattern) - Add more specific CSS selectors with data-testid and placeholder - Follow Gradio official documentation for CSS application
Browse files- CodeWeaver/ui/app.py +12 -5
CodeWeaver/ui/app.py
CHANGED
|
@@ -53,15 +53,21 @@ CSS = """
|
|
| 53 |
max-width: 100% !important;
|
| 54 |
box-sizing: border-box !important;
|
| 55 |
}
|
| 56 |
-
/* Textbox ๋ด๋ถ input ์์ ์คํ์ผ */
|
| 57 |
#session_id_input input[type="text"],
|
| 58 |
-
#session_id_input textarea
|
|
|
|
| 59 |
width: 100% !important;
|
| 60 |
min-width: 0 !important;
|
| 61 |
box-sizing: border-box !important;
|
| 62 |
height: 30px !important;
|
| 63 |
min-height: 30px !important;
|
| 64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
/* Textbox ์ปจํ
์ด๋ ์คํ์ผ */
|
| 66 |
#session_id_input.form,
|
| 67 |
#session_id_input > .form {
|
|
@@ -139,7 +145,8 @@ def create_demo() -> gr.Blocks:
|
|
| 139 |
"""Gradio ์ธํฐํ์ด์ค๋ฅผ ์์ฑํฉ๋๋ค."""
|
| 140 |
|
| 141 |
with gr.Blocks(
|
| 142 |
-
title="CodeWeaver - AI ๊ฐ๋ฐ ๋์ฐ๋ฏธ"
|
|
|
|
| 143 |
) as demo:
|
| 144 |
|
| 145 |
gr.Markdown("""
|
|
@@ -290,6 +297,6 @@ if __name__ == "__main__":
|
|
| 290 |
server_name="0.0.0.0",
|
| 291 |
server_port=7860,
|
| 292 |
share=False,
|
| 293 |
-
theme=gr.themes.Soft()
|
| 294 |
-
|
| 295 |
)
|
|
|
|
| 53 |
max-width: 100% !important;
|
| 54 |
box-sizing: border-box !important;
|
| 55 |
}
|
| 56 |
+
/* Textbox ๋ด๋ถ input ์์ ์คํ์ผ - data-testid๋ก ๋ ๊ตฌ์ฒด์ ์ผ๋ก ํ๊ฒํ
*/
|
| 57 |
#session_id_input input[type="text"],
|
| 58 |
+
#session_id_input textarea,
|
| 59 |
+
#session_id_input textarea[data-testid="textbox"] {
|
| 60 |
width: 100% !important;
|
| 61 |
min-width: 0 !important;
|
| 62 |
box-sizing: border-box !important;
|
| 63 |
height: 30px !important;
|
| 64 |
min-height: 30px !important;
|
| 65 |
}
|
| 66 |
+
/* Gradio์ textbox ์์ ์ง์ ํ๊ฒํ
*/
|
| 67 |
+
textarea[data-testid="textbox"][placeholder*="์ธ์
ID"] {
|
| 68 |
+
height: 30px !important;
|
| 69 |
+
min-height: 30px !important;
|
| 70 |
+
}
|
| 71 |
/* Textbox ์ปจํ
์ด๋ ์คํ์ผ */
|
| 72 |
#session_id_input.form,
|
| 73 |
#session_id_input > .form {
|
|
|
|
| 145 |
"""Gradio ์ธํฐํ์ด์ค๋ฅผ ์์ฑํฉ๋๋ค."""
|
| 146 |
|
| 147 |
with gr.Blocks(
|
| 148 |
+
title="CodeWeaver - AI ๊ฐ๋ฐ ๋์ฐ๋ฏธ",
|
| 149 |
+
css=CSS # Gradio Blocks ๋ฌธ์: CSS๋ฅผ Blocks ์์ฑ์์ ์ ๋ฌ
|
| 150 |
) as demo:
|
| 151 |
|
| 152 |
gr.Markdown("""
|
|
|
|
| 297 |
server_name="0.0.0.0",
|
| 298 |
server_port=7860,
|
| 299 |
share=False,
|
| 300 |
+
theme=gr.themes.Soft()
|
| 301 |
+
# CSS๋ Blocks ์์ฑ์์ ์ ๋ฌ๋จ
|
| 302 |
)
|