Update app.py
Browse files
app.py
CHANGED
|
@@ -98,6 +98,27 @@ HF_TEXTGEN_TOKEN = bool(os.getenv("HF_READ_TOKEN") or os.getenv("HF_TOKEN"))
|
|
| 98 |
|
| 99 |
# CSS copied from prior app.py to preserve exact look-and-feel
|
| 100 |
CSS_STYLES = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
/* Style only the top-level app title to avoid affecting headings elsewhere */
|
| 102 |
.app-title {
|
| 103 |
text-align: center;
|
|
|
|
| 98 |
|
| 99 |
# CSS copied from prior app.py to preserve exact look-and-feel
|
| 100 |
CSS_STYLES = """
|
| 101 |
+
/* App background: subtle top-left glow, light coming from one side */
|
| 102 |
+
.gradio-container {
|
| 103 |
+
/* Keep existing theme background but add a faint glow overlay */
|
| 104 |
+
background-image:
|
| 105 |
+
radial-gradient(1200px 800px at 0% 0%, rgba(99, 102, 241, 0.10), rgba(99, 102, 241, 0.00) 70%),
|
| 106 |
+
radial-gradient(700px 500px at 100% 0%, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.00) 70%);
|
| 107 |
+
background-attachment: fixed, fixed; /* gentle parallax feel on scroll */
|
| 108 |
+
background-repeat: no-repeat;
|
| 109 |
+
background-blend-mode: screen; /* subtle light effect over dark themes */
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
@media (prefers-color-scheme: light) {
|
| 113 |
+
.gradio-container {
|
| 114 |
+
/* Slightly softer in light mode */
|
| 115 |
+
background-image:
|
| 116 |
+
radial-gradient(1200px 800px at 0% 0%, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.00) 70%),
|
| 117 |
+
radial-gradient(700px 500px at 100% 0%, rgba(59, 130, 246, 0.04), rgba(59, 130, 246, 0.00) 70%);
|
| 118 |
+
background-blend-mode: multiply; /* keep gentle tint over light base */
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
/* Style only the top-level app title to avoid affecting headings elsewhere */
|
| 123 |
.app-title {
|
| 124 |
text-align: center;
|