Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -154,31 +154,29 @@ THEME = gr.themes.Soft(
|
|
| 154 |
CUSTOM_CSS = """
|
| 155 |
html,
|
| 156 |
body {
|
| 157 |
-
|
| 158 |
-
margin: 0;
|
| 159 |
-
overflow: hidden !important;
|
| 160 |
background: #fff8cc !important;
|
|
|
|
|
|
|
| 161 |
}
|
| 162 |
|
| 163 |
.gradio-container {
|
| 164 |
-
height: 100dvh !important;
|
| 165 |
min-height: 100dvh !important;
|
| 166 |
-
overflow: hidden !important;
|
| 167 |
background: #fff8cc !important;
|
| 168 |
color: #1f2937 !important;
|
|
|
|
| 169 |
}
|
| 170 |
|
| 171 |
-
/*
|
| 172 |
-
.gradio-container .main
|
|
|
|
| 173 |
min-height: 0 !important;
|
| 174 |
}
|
| 175 |
|
| 176 |
-
/* Solid light-yellow interface */
|
| 177 |
-
.gradio-container,
|
| 178 |
.gradio-container .block,
|
| 179 |
.gradio-container .panel,
|
| 180 |
.gradio-container .form {
|
| 181 |
-
background-color:
|
| 182 |
}
|
| 183 |
|
| 184 |
/* Title */
|
|
@@ -187,20 +185,41 @@ body {
|
|
| 187 |
letter-spacing: -0.02em;
|
| 188 |
}
|
| 189 |
|
| 190 |
-
/* Readable
|
| 191 |
.gradio-container p,
|
| 192 |
-
.gradio-container label
|
| 193 |
-
|
| 194 |
-
color: #1f2937;
|
| 195 |
}
|
| 196 |
|
| 197 |
-
/*
|
| 198 |
.gradio-container a,
|
| 199 |
.gradio-container a:visited,
|
| 200 |
.gradio-container a:hover,
|
| 201 |
.gradio-container a:active {
|
| 202 |
color: #111827 !important;
|
| 203 |
-
text-decoration: underline;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
}
|
| 205 |
|
| 206 |
/* User messages */
|
|
@@ -219,25 +238,16 @@ body {
|
|
| 219 |
color: #1f2937 !important;
|
| 220 |
}
|
| 221 |
|
| 222 |
-
/*
|
| 223 |
-
.gradio-container
|
| 224 |
-
|
| 225 |
-
min-height: 220px !important;
|
| 226 |
-
max-height: calc(100dvh - 360px) !important;
|
| 227 |
-
overflow-y: auto !important;
|
| 228 |
-
}
|
| 229 |
-
|
| 230 |
-
/* Bright, clearly visible message input */
|
| 231 |
-
.gradio-container textarea,
|
| 232 |
-
.gradio-container [data-testid="textbox"] {
|
| 233 |
border: 2px solid #e59b16 !important;
|
| 234 |
border-radius: 16px !important;
|
| 235 |
background: #fffdf0 !important;
|
| 236 |
color: #1f2937 !important;
|
| 237 |
}
|
| 238 |
|
| 239 |
-
.gradio-container textarea:focus
|
| 240 |
-
.gradio-container [data-testid="textbox"]:focus-within {
|
| 241 |
border-color: #c2410c !important;
|
| 242 |
box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.18) !important;
|
| 243 |
}
|
|
@@ -261,16 +271,18 @@ body {
|
|
| 261 |
color: #78350f !important;
|
| 262 |
}
|
| 263 |
|
| 264 |
-
/* Remove
|
| 265 |
footer {
|
| 266 |
display: none !important;
|
| 267 |
}
|
| 268 |
|
| 269 |
-
/*
|
| 270 |
@media (max-width: 640px) {
|
| 271 |
-
.gradio-container .
|
| 272 |
-
|
| 273 |
-
|
|
|
|
|
|
|
| 274 |
}
|
| 275 |
}
|
| 276 |
"""
|
|
|
|
| 154 |
CUSTOM_CSS = """
|
| 155 |
html,
|
| 156 |
body {
|
| 157 |
+
margin: 0 !important;
|
|
|
|
|
|
|
| 158 |
background: #fff8cc !important;
|
| 159 |
+
overflow-x: hidden !important;
|
| 160 |
+
overflow-y: auto !important;
|
| 161 |
}
|
| 162 |
|
| 163 |
.gradio-container {
|
|
|
|
| 164 |
min-height: 100dvh !important;
|
|
|
|
| 165 |
background: #fff8cc !important;
|
| 166 |
color: #1f2937 !important;
|
| 167 |
+
overflow: visible !important;
|
| 168 |
}
|
| 169 |
|
| 170 |
+
/* Prevent layout containers from forcing extra height */
|
| 171 |
+
.gradio-container .main,
|
| 172 |
+
.gradio-container .contain {
|
| 173 |
min-height: 0 !important;
|
| 174 |
}
|
| 175 |
|
|
|
|
|
|
|
| 176 |
.gradio-container .block,
|
| 177 |
.gradio-container .panel,
|
| 178 |
.gradio-container .form {
|
| 179 |
+
background-color: transparent !important;
|
| 180 |
}
|
| 181 |
|
| 182 |
/* Title */
|
|
|
|
| 185 |
letter-spacing: -0.02em;
|
| 186 |
}
|
| 187 |
|
| 188 |
+
/* Readable text */
|
| 189 |
.gradio-container p,
|
| 190 |
+
.gradio-container label {
|
| 191 |
+
color: #1f2937 !important;
|
|
|
|
| 192 |
}
|
| 193 |
|
| 194 |
+
/* Black hyperlinks */
|
| 195 |
.gradio-container a,
|
| 196 |
.gradio-container a:visited,
|
| 197 |
.gradio-container a:hover,
|
| 198 |
.gradio-container a:active {
|
| 199 |
color: #111827 !important;
|
| 200 |
+
text-decoration: underline !important;
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
/*
|
| 204 |
+
Correct Gradio chat container.
|
| 205 |
+
This prevents the chat from expanding the entire page.
|
| 206 |
+
*/
|
| 207 |
+
.gradio-container .block.flex:has(
|
| 208 |
+
[role="log"][aria-label="chatbot conversation"]
|
| 209 |
+
) {
|
| 210 |
+
flex-grow: 0 !important;
|
| 211 |
+
height: min(400px, max(220px, calc(100dvh - 350px))) !important;
|
| 212 |
+
min-height: 220px !important;
|
| 213 |
+
overflow: hidden !important;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
/* Make only the conversation area scroll */
|
| 217 |
+
.gradio-container [role="log"][aria-label="chatbot conversation"] {
|
| 218 |
+
height: 100% !important;
|
| 219 |
+
min-height: 0 !important;
|
| 220 |
+
max-height: none !important;
|
| 221 |
+
overflow-x: hidden !important;
|
| 222 |
+
overflow-y: auto !important;
|
| 223 |
}
|
| 224 |
|
| 225 |
/* User messages */
|
|
|
|
| 238 |
color: #1f2937 !important;
|
| 239 |
}
|
| 240 |
|
| 241 |
+
/* Clearly highlighted input box */
|
| 242 |
+
.gradio-container textarea {
|
| 243 |
+
min-height: 54px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
border: 2px solid #e59b16 !important;
|
| 245 |
border-radius: 16px !important;
|
| 246 |
background: #fffdf0 !important;
|
| 247 |
color: #1f2937 !important;
|
| 248 |
}
|
| 249 |
|
| 250 |
+
.gradio-container textarea:focus {
|
|
|
|
| 251 |
border-color: #c2410c !important;
|
| 252 |
box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.18) !important;
|
| 253 |
}
|
|
|
|
| 271 |
color: #78350f !important;
|
| 272 |
}
|
| 273 |
|
| 274 |
+
/* Remove footer */
|
| 275 |
footer {
|
| 276 |
display: none !important;
|
| 277 |
}
|
| 278 |
|
| 279 |
+
/* Mobile layout */
|
| 280 |
@media (max-width: 640px) {
|
| 281 |
+
.gradio-container .block.flex:has(
|
| 282 |
+
[role="log"][aria-label="chatbot conversation"]
|
| 283 |
+
) {
|
| 284 |
+
height: 42dvh !important;
|
| 285 |
+
min-height: 180px !important;
|
| 286 |
}
|
| 287 |
}
|
| 288 |
"""
|