Spaces:
Sleeping
Sleeping
i changed the whole design again whoops
Browse files
app.py
CHANGED
|
@@ -60,48 +60,163 @@ def respond(message, chat_history):
|
|
| 60 |
return chat_history, image_paths
|
| 61 |
|
| 62 |
#hopefully fixed CSS code
|
|
|
|
| 63 |
css = """
|
| 64 |
-
.gradio-container {
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
#input-box textarea {
|
| 69 |
-
background-color: #
|
| 70 |
color: white !important;
|
| 71 |
-
border: 2px solid #
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
#input-box textarea::placeholder {
|
| 74 |
-
color: rgba(255, 255, 255, 0.
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
-
/*
|
| 78 |
.message-wrap .message {
|
| 79 |
-
background-color: #
|
| 80 |
-
color: white !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
}
|
| 82 |
|
| 83 |
-
/* Alternative chatbot styling if the above doesn't work */
|
| 84 |
.chatbot .message.bot, .chatbot .message.assistant {
|
| 85 |
-
background-color: #
|
| 86 |
color: white !important;
|
| 87 |
}
|
| 88 |
|
| 89 |
-
/*
|
| 90 |
h1 {
|
| 91 |
font-family: 'Pinyon Script', 'Brush Script MT', cursive !important;
|
| 92 |
-
font-size:
|
| 93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
.textbox input, .textbox textarea {
|
| 98 |
-
background-color: #
|
| 99 |
color: white !important;
|
| 100 |
-
border: 2px solid #
|
|
|
|
|
|
|
| 101 |
}
|
| 102 |
-
"""
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
with gr.Blocks(css=css) as demo:
|
| 107 |
gr.HTML("""
|
|
|
|
| 60 |
return chat_history, image_paths
|
| 61 |
|
| 62 |
#hopefully fixed CSS code
|
| 63 |
+
# Updated CSS section - replace your existing CSS variable
|
| 64 |
css = """
|
| 65 |
+
.gradio-container {
|
| 66 |
+
background: linear-gradient(135deg, #F4D2D0 0%, #E8B5B3 100%) !important;
|
| 67 |
+
font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/* Professional container styling */
|
| 71 |
+
#chatbot-box {
|
| 72 |
+
background-color: #2F4F4F !important;
|
| 73 |
+
color: white !important;
|
| 74 |
+
border-radius: 12px !important;
|
| 75 |
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
|
| 76 |
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
#gallery-box {
|
| 80 |
+
background-color: #2F4F4F !important;
|
| 81 |
+
border-radius: 12px !important;
|
| 82 |
+
padding: 20px !important;
|
| 83 |
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
|
| 84 |
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
#gallery-box img {
|
| 88 |
+
border: 2px solid #DAA520 !important;
|
| 89 |
+
border-radius: 8px !important;
|
| 90 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease !important;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
#gallery-box img:hover {
|
| 94 |
+
transform: translateY(-2px) !important;
|
| 95 |
+
box-shadow: 0 12px 24px rgba(218, 165, 32, 0.3) !important;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
#input-box textarea {
|
| 99 |
+
background-color: #4A6B70 !important;
|
| 100 |
color: white !important;
|
| 101 |
+
border: 2px solid #2F4F4F !important;
|
| 102 |
+
border-radius: 10px !important;
|
| 103 |
+
padding: 15px !important;
|
| 104 |
+
font-size: 14px !important;
|
| 105 |
+
transition: border-color 0.3s ease !important;
|
| 106 |
}
|
| 107 |
+
|
| 108 |
+
#input-box textarea:focus {
|
| 109 |
+
border-color: #DAA520 !important;
|
| 110 |
+
box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1) !important;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
#input-box textarea::placeholder {
|
| 114 |
+
color: rgba(255, 255, 255, 0.6) !important;
|
| 115 |
+
font-style: italic !important;
|
| 116 |
}
|
| 117 |
|
| 118 |
+
/* Refined chatbot messages */
|
| 119 |
.message-wrap .message {
|
| 120 |
+
background-color: #2F4F4F !important;
|
| 121 |
+
color: white !important;
|
| 122 |
+
padding: 16px 20px !important;
|
| 123 |
+
border-radius: 10px !important;
|
| 124 |
+
margin: 8px 0 !important;
|
| 125 |
+
line-height: 1.6 !important;
|
| 126 |
}
|
| 127 |
|
|
|
|
| 128 |
.chatbot .message.bot, .chatbot .message.assistant {
|
| 129 |
+
background-color: #2F4F4F !important;
|
| 130 |
color: white !important;
|
| 131 |
}
|
| 132 |
|
| 133 |
+
/* Sophisticated title styling */
|
| 134 |
h1 {
|
| 135 |
font-family: 'Pinyon Script', 'Brush Script MT', cursive !important;
|
| 136 |
+
font-size: 3.2em !important;
|
| 137 |
+
background: linear-gradient(45deg, #2F4F4F, #4A6B70) !important;
|
| 138 |
+
-webkit-background-clip: text !important;
|
| 139 |
+
-webkit-text-fill-color: transparent !important;
|
| 140 |
+
background-clip: text !important;
|
| 141 |
+
text-align: center !important;
|
| 142 |
+
margin: 20px 0 30px 0 !important;
|
| 143 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1) !important;
|
| 144 |
}
|
| 145 |
|
| 146 |
+
/* Professional subtitle */
|
| 147 |
+
.gradio-markdown p {
|
| 148 |
+
color: #2F4F4F !important;
|
| 149 |
+
font-size: 1.1em !important;
|
| 150 |
+
text-align: center !important;
|
| 151 |
+
margin-bottom: 30px !important;
|
| 152 |
+
font-weight: 400 !important;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
/* Refined input styling */
|
| 156 |
.textbox input, .textbox textarea {
|
| 157 |
+
background-color: #4A6B70 !important;
|
| 158 |
color: white !important;
|
| 159 |
+
border: 2px solid #2F4F4F !important;
|
| 160 |
+
border-radius: 10px !important;
|
| 161 |
+
transition: all 0.3s ease !important;
|
| 162 |
}
|
|
|
|
| 163 |
|
| 164 |
+
/* Professional labels */
|
| 165 |
+
.form label {
|
| 166 |
+
color: #2F4F4F !important;
|
| 167 |
+
font-weight: 600 !important;
|
| 168 |
+
font-size: 0.95em !important;
|
| 169 |
+
margin-bottom: 8px !important;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
/* Elegant scrollbar for chat */
|
| 173 |
+
#chatbot-box .overflow-y-auto::-webkit-scrollbar {
|
| 174 |
+
width: 6px !important;
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
#chatbot-box .overflow-y-auto::-webkit-scrollbar-track {
|
| 178 |
+
background: rgba(255, 255, 255, 0.1) !important;
|
| 179 |
+
border-radius: 3px !important;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
#chatbot-box .overflow-y-auto::-webkit-scrollbar-thumb {
|
| 183 |
+
background: rgba(218, 165, 32, 0.6) !important;
|
| 184 |
+
border-radius: 3px !important;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
#chatbot-box .overflow-y-auto::-webkit-scrollbar-thumb:hover {
|
| 188 |
+
background: rgba(218, 165, 32, 0.8) !important;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
/* Refined gallery grid */
|
| 192 |
+
#gallery-box .grid {
|
| 193 |
+
gap: 16px !important;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
/* Professional button styling if any */
|
| 197 |
+
.btn {
|
| 198 |
+
background: linear-gradient(135deg, #4A6B70, #2F4F4F) !important;
|
| 199 |
+
border: none !important;
|
| 200 |
+
color: white !important;
|
| 201 |
+
padding: 12px 24px !important;
|
| 202 |
+
border-radius: 8px !important;
|
| 203 |
+
font-weight: 500 !important;
|
| 204 |
+
transition: all 0.3s ease !important;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
.btn:hover {
|
| 208 |
+
transform: translateY(-1px) !important;
|
| 209 |
+
box-shadow: 0 6px 20px rgba(47, 79, 79, 0.4) !important;
|
| 210 |
+
}
|
| 211 |
+
"""
|
| 212 |
|
| 213 |
+
# Add this function to load the Google Font
|
| 214 |
+
def load_google_font():
|
| 215 |
+
return """
|
| 216 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 217 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 218 |
+
<link href="https://fonts.googleapis.com/css2?family=Pinyon+Script&display=swap" rel="stylesheet">
|
| 219 |
+
"""
|
| 220 |
|
| 221 |
with gr.Blocks(css=css) as demo:
|
| 222 |
gr.HTML("""
|