Update app.py
Browse files
app.py
CHANGED
|
@@ -35,8 +35,11 @@ body, .gradio-container {
|
|
| 35 |
background-color: var(--bg-dark) !important;
|
| 36 |
font-family: 'EB Garamond', serif !important;
|
| 37 |
color: var(--papyrus) !important;
|
| 38 |
-
max-width:
|
| 39 |
-
margin: auto !important;
|
|
|
|
|
|
|
|
|
|
| 40 |
}
|
| 41 |
|
| 42 |
/* Texture Overlay */
|
|
@@ -45,32 +48,31 @@ body, .gradio-container {
|
|
| 45 |
position: fixed;
|
| 46 |
inset: 0;
|
| 47 |
background-image: url("https://www.transparenttextures.com/patterns/black-linen.png");
|
| 48 |
-
opacity: 0.
|
| 49 |
pointer-events: none;
|
| 50 |
z-index: 0;
|
| 51 |
}
|
| 52 |
|
| 53 |
-
/* ββ Header βββββββββββββββββββββββββββββββ
|
| 54 |
.header-block {
|
| 55 |
text-align: center;
|
| 56 |
-
padding:
|
| 57 |
-
border-bottom:
|
| 58 |
-
margin-bottom:
|
| 59 |
}
|
| 60 |
.header-block h1 {
|
| 61 |
font-family: 'Cinzel', serif !important;
|
| 62 |
-
font-size:
|
| 63 |
font-weight: 700 !important;
|
| 64 |
color: var(--gold) !important;
|
| 65 |
-
letter-spacing: 0.
|
| 66 |
margin: 0 !important;
|
| 67 |
}
|
| 68 |
.header-block p {
|
| 69 |
font-family: 'Cinzel', serif !important;
|
| 70 |
color: var(--gold-dim) !important;
|
| 71 |
-
font-size: 0.
|
| 72 |
-
|
| 73 |
-
margin-top: 8px !important;
|
| 74 |
text-transform: uppercase;
|
| 75 |
}
|
| 76 |
|
|
@@ -79,23 +81,24 @@ body, .gradio-container {
|
|
| 79 |
background: var(--stone) !important;
|
| 80 |
border: 1px solid var(--gold) !important;
|
| 81 |
border-radius: 8px !important;
|
|
|
|
|
|
|
| 82 |
}
|
| 83 |
|
| 84 |
-
/* User Message - Obsidian/Stone style */
|
| 85 |
#chatbot .message.user {
|
| 86 |
background: #1a1814 !important;
|
| 87 |
color: var(--papyrus) !important;
|
| 88 |
border-radius: 8px 8px 0 8px !important;
|
| 89 |
-
|
|
|
|
| 90 |
}
|
| 91 |
|
| 92 |
-
/* Bot Message - High readability Papyrus */
|
| 93 |
#chatbot .message.bot {
|
| 94 |
background: var(--papyrus) !important;
|
| 95 |
color: #1a1f16 !important;
|
| 96 |
border-radius: 8px 8px 8px 0 !important;
|
| 97 |
-
|
| 98 |
-
|
| 99 |
}
|
| 100 |
|
| 101 |
/* ββ Input Row βββββββββββββββββββββββββββββββββββββ */
|
|
@@ -104,42 +107,27 @@ textarea, input[type="text"] {
|
|
| 104 |
border: 1px solid var(--stone) !important;
|
| 105 |
border-radius: 4px !important;
|
| 106 |
color: var(--papyrus) !important;
|
| 107 |
-
font-
|
| 108 |
-
}
|
| 109 |
-
textarea:focus, input[type="text"]:focus {
|
| 110 |
-
border-color: var(--gold) !important;
|
| 111 |
-
}
|
| 112 |
-
|
| 113 |
-
/* ββ Send Button βββββββββββββββββββββββββββββββββββ */
|
| 114 |
-
button.primary {
|
| 115 |
-
background: linear-gradient(135deg, var(--gold), var(--gold-dim)) !important;
|
| 116 |
-
border: none !important;
|
| 117 |
-
color: #000 !important;
|
| 118 |
-
font-family: 'Cinzel', serif !important;
|
| 119 |
-
font-weight: bold !important;
|
| 120 |
}
|
| 121 |
|
| 122 |
-
/* ββ Examples βββββββββββββββββββββββββββββ
|
| 123 |
.examples-holder {
|
| 124 |
border-top: 1px solid var(--gold-dim) !important;
|
| 125 |
-
margin-top:
|
|
|
|
| 126 |
}
|
| 127 |
|
| 128 |
.examples-holder button {
|
| 129 |
background: var(--stone) !important;
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
font-family: 'EB Garamond', serif !important;
|
| 133 |
-
transition: all 0.3s ease;
|
| 134 |
-
}
|
| 135 |
-
|
| 136 |
-
.examples-holder button:hover {
|
| 137 |
-
background: var(--gold) !important;
|
| 138 |
-
color: #000 !important;
|
| 139 |
-
transform: translateY(-2px);
|
| 140 |
}
|
| 141 |
|
| 142 |
footer { display: none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
"""
|
| 144 |
|
| 145 |
with gr.Blocks() as demo:
|
|
|
|
| 35 |
background-color: var(--bg-dark) !important;
|
| 36 |
font-family: 'EB Garamond', serif !important;
|
| 37 |
color: var(--papyrus) !important;
|
| 38 |
+
max-width: 700px !important; /* Narrowed for better mobile/video framing */
|
| 39 |
+
margin: 0 auto !important;
|
| 40 |
+
padding: 10px !important; /* Reduced padding */
|
| 41 |
+
height: 100vh !important; /* Force full height usage */
|
| 42 |
+
overflow: hidden !important; /* Prevent scrollbars on the body */
|
| 43 |
}
|
| 44 |
|
| 45 |
/* Texture Overlay */
|
|
|
|
| 48 |
position: fixed;
|
| 49 |
inset: 0;
|
| 50 |
background-image: url("https://www.transparenttextures.com/patterns/black-linen.png");
|
| 51 |
+
opacity: 0.15;
|
| 52 |
pointer-events: none;
|
| 53 |
z-index: 0;
|
| 54 |
}
|
| 55 |
|
| 56 |
+
/* ββ Compact Header βββββββββββββββββββββββββββββββ */
|
| 57 |
.header-block {
|
| 58 |
text-align: center;
|
| 59 |
+
padding: 10px 0 10px; /* Heavily reduced padding */
|
| 60 |
+
border-bottom: 1px solid var(--gold);
|
| 61 |
+
margin-bottom: 15px;
|
| 62 |
}
|
| 63 |
.header-block h1 {
|
| 64 |
font-family: 'Cinzel', serif !important;
|
| 65 |
+
font-size: 1.8rem !important; /* Shrunk from 3rem */
|
| 66 |
font-weight: 700 !important;
|
| 67 |
color: var(--gold) !important;
|
| 68 |
+
letter-spacing: 0.1em !important;
|
| 69 |
margin: 0 !important;
|
| 70 |
}
|
| 71 |
.header-block p {
|
| 72 |
font-family: 'Cinzel', serif !important;
|
| 73 |
color: var(--gold-dim) !important;
|
| 74 |
+
font-size: 0.7rem !important; /* Shrunk */
|
| 75 |
+
margin-top: 4px !important;
|
|
|
|
| 76 |
text-transform: uppercase;
|
| 77 |
}
|
| 78 |
|
|
|
|
| 81 |
background: var(--stone) !important;
|
| 82 |
border: 1px solid var(--gold) !important;
|
| 83 |
border-radius: 8px !important;
|
| 84 |
+
height: 450px !important; /* FIXED HEIGHT: Essential for "one shot" */
|
| 85 |
+
min-height: 300px !important;
|
| 86 |
}
|
| 87 |
|
|
|
|
| 88 |
#chatbot .message.user {
|
| 89 |
background: #1a1814 !important;
|
| 90 |
color: var(--papyrus) !important;
|
| 91 |
border-radius: 8px 8px 0 8px !important;
|
| 92 |
+
font-size: 0.9rem !important;
|
| 93 |
+
padding: 8px !important;
|
| 94 |
}
|
| 95 |
|
|
|
|
| 96 |
#chatbot .message.bot {
|
| 97 |
background: var(--papyrus) !important;
|
| 98 |
color: #1a1f16 !important;
|
| 99 |
border-radius: 8px 8px 8px 0 !important;
|
| 100 |
+
font-size: 0.9rem !important; /* Shrunk for readability in small box */
|
| 101 |
+
padding: 8px !important;
|
| 102 |
}
|
| 103 |
|
| 104 |
/* ββ Input Row βββββββββββββββββββββββββββββββββββββ */
|
|
|
|
| 107 |
border: 1px solid var(--stone) !important;
|
| 108 |
border-radius: 4px !important;
|
| 109 |
color: var(--papyrus) !important;
|
| 110 |
+
font-size: 0.9rem !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
}
|
| 112 |
|
| 113 |
+
/* ββ Examples & Footer βββββββββββββββββββββββββββββ */
|
| 114 |
.examples-holder {
|
| 115 |
border-top: 1px solid var(--gold-dim) !important;
|
| 116 |
+
margin-top: 5px !important;
|
| 117 |
+
padding-top: 5px !important;
|
| 118 |
}
|
| 119 |
|
| 120 |
.examples-holder button {
|
| 121 |
background: var(--stone) !important;
|
| 122 |
+
font-size: 0.8rem !important;
|
| 123 |
+
padding: 4px 8px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
|
| 126 |
footer { display: none !important; }
|
| 127 |
+
|
| 128 |
+
/* ββ Optimization for Demo Recording ββββββββββββββββ */
|
| 129 |
+
/* This hides the "Built with Gradio" and extra spacing */
|
| 130 |
+
.gap.vgap { gap: 10px !important; }
|
| 131 |
"""
|
| 132 |
|
| 133 |
with gr.Blocks() as demo:
|