Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Remove nested textbox wrappers
Browse files
app.py
CHANGED
|
@@ -717,8 +717,8 @@ def build_demo() -> gr.Blocks:
|
|
| 717 |
instructions = gr.Textbox(
|
| 718 |
value="",
|
| 719 |
label="Instructions",
|
| 720 |
-
show_label=
|
| 721 |
-
container=
|
| 722 |
lines=4,
|
| 723 |
max_lines=8,
|
| 724 |
max_length=MAX_INPUT_CHARS,
|
|
@@ -727,8 +727,8 @@ def build_demo() -> gr.Blocks:
|
|
| 727 |
source_text = gr.Textbox(
|
| 728 |
value="",
|
| 729 |
label="Source text",
|
| 730 |
-
show_label=
|
| 731 |
-
container=
|
| 732 |
lines=10,
|
| 733 |
max_lines=16,
|
| 734 |
max_length=MAX_INPUT_CHARS,
|
|
@@ -762,8 +762,8 @@ def build_demo() -> gr.Blocks:
|
|
| 762 |
translation_output = gr.Textbox(
|
| 763 |
value="",
|
| 764 |
label="Translation",
|
| 765 |
-
show_label=
|
| 766 |
-
container=
|
| 767 |
interactive=False,
|
| 768 |
lines=18,
|
| 769 |
buttons=["copy"],
|
|
|
|
| 717 |
instructions = gr.Textbox(
|
| 718 |
value="",
|
| 719 |
label="Instructions",
|
| 720 |
+
show_label=False,
|
| 721 |
+
container=False,
|
| 722 |
lines=4,
|
| 723 |
max_lines=8,
|
| 724 |
max_length=MAX_INPUT_CHARS,
|
|
|
|
| 727 |
source_text = gr.Textbox(
|
| 728 |
value="",
|
| 729 |
label="Source text",
|
| 730 |
+
show_label=False,
|
| 731 |
+
container=False,
|
| 732 |
lines=10,
|
| 733 |
max_lines=16,
|
| 734 |
max_length=MAX_INPUT_CHARS,
|
|
|
|
| 762 |
translation_output = gr.Textbox(
|
| 763 |
value="",
|
| 764 |
label="Translation",
|
| 765 |
+
show_label=False,
|
| 766 |
+
container=False,
|
| 767 |
interactive=False,
|
| 768 |
lines=18,
|
| 769 |
buttons=["copy"],
|
style.css
CHANGED
|
@@ -190,6 +190,7 @@ footer {
|
|
| 190 |
#source-text-input,
|
| 191 |
#translation-output {
|
| 192 |
overflow: hidden;
|
|
|
|
| 193 |
border: 1px solid var(--mushroom-300) !important;
|
| 194 |
background: #fff !important;
|
| 195 |
box-shadow: none !important;
|
|
@@ -217,28 +218,13 @@ footer {
|
|
| 217 |
background: #f0f2f3 !important;
|
| 218 |
}
|
| 219 |
|
| 220 |
-
#instructions-input
|
| 221 |
-
#source-text-input
|
| 222 |
-
#translation-output
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
min-height: 0 !important;
|
| 228 |
-
}
|
| 229 |
-
|
| 230 |
-
#instructions-input label,
|
| 231 |
-
#source-text-input label,
|
| 232 |
-
#translation-output label {
|
| 233 |
-
display: flex !important;
|
| 234 |
-
flex-direction: column;
|
| 235 |
-
}
|
| 236 |
-
|
| 237 |
-
#instructions-input .block-info,
|
| 238 |
-
#source-text-input .block-info,
|
| 239 |
-
#translation-output .block-info {
|
| 240 |
-
flex: 0 0 auto;
|
| 241 |
-
padding: 14px 20px 0;
|
| 242 |
color: var(--volcanic-500) !important;
|
| 243 |
font-family: var(--sans) !important;
|
| 244 |
font-size: 10px !important;
|
|
@@ -246,13 +232,19 @@ footer {
|
|
| 246 |
line-height: 1.2 !important;
|
| 247 |
letter-spacing: 0.04em;
|
| 248 |
text-transform: uppercase;
|
|
|
|
| 249 |
}
|
| 250 |
|
| 251 |
-
#instructions-input
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
}
|
| 257 |
|
| 258 |
#instructions-input textarea,
|
|
@@ -260,7 +252,7 @@ footer {
|
|
| 260 |
#translation-output textarea {
|
| 261 |
height: 100% !important;
|
| 262 |
min-height: 0 !important;
|
| 263 |
-
padding:
|
| 264 |
overflow-y: auto !important;
|
| 265 |
resize: none !important;
|
| 266 |
border: 0 !important;
|
|
|
|
| 190 |
#source-text-input,
|
| 191 |
#translation-output {
|
| 192 |
overflow: hidden;
|
| 193 |
+
position: relative;
|
| 194 |
border: 1px solid var(--mushroom-300) !important;
|
| 195 |
background: #fff !important;
|
| 196 |
box-shadow: none !important;
|
|
|
|
| 218 |
background: #f0f2f3 !important;
|
| 219 |
}
|
| 220 |
|
| 221 |
+
#instructions-input::before,
|
| 222 |
+
#source-text-input::before,
|
| 223 |
+
#translation-output::before {
|
| 224 |
+
position: absolute;
|
| 225 |
+
top: 13px;
|
| 226 |
+
left: 20px;
|
| 227 |
+
z-index: 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
color: var(--volcanic-500) !important;
|
| 229 |
font-family: var(--sans) !important;
|
| 230 |
font-size: 10px !important;
|
|
|
|
| 232 |
line-height: 1.2 !important;
|
| 233 |
letter-spacing: 0.04em;
|
| 234 |
text-transform: uppercase;
|
| 235 |
+
pointer-events: none;
|
| 236 |
}
|
| 237 |
|
| 238 |
+
#instructions-input::before {
|
| 239 |
+
content: "Instructions";
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
#source-text-input::before {
|
| 243 |
+
content: "Source text";
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
#translation-output::before {
|
| 247 |
+
content: "Translation";
|
| 248 |
}
|
| 249 |
|
| 250 |
#instructions-input textarea,
|
|
|
|
| 252 |
#translation-output textarea {
|
| 253 |
height: 100% !important;
|
| 254 |
min-height: 0 !important;
|
| 255 |
+
padding: 34px 20px 16px !important;
|
| 256 |
overflow-y: auto !important;
|
| 257 |
resize: none !important;
|
| 258 |
border: 0 !important;
|