Update app.py
Browse files
app.py
CHANGED
|
@@ -145,89 +145,8 @@ def chat_with_ai(message, history, role, audio_file=None):
|
|
| 145 |
return format_history_for_gradio(history), history
|
| 146 |
|
| 147 |
|
| 148 |
-
def create_chatbot():
|
| 149 |
-
|
| 150 |
-
@import url('https://api.fontshare.com/v2/css?f[]=norwester@700&display=swap');
|
| 151 |
-
|
| 152 |
-
/* Global Styles */
|
| 153 |
-
.gradio-container {
|
| 154 |
-
background-color: #0d1117;
|
| 155 |
-
color: #a020f0;
|
| 156 |
-
font-family: 'Norwester', sans-serif;
|
| 157 |
-
overflow: hidden;
|
| 158 |
-
}
|
| 159 |
-
|
| 160 |
-
.gradio-input, .gradio-textbox, .gradio-button {
|
| 161 |
-
background-color: #161b22;
|
| 162 |
-
color: #a020f0;
|
| 163 |
-
font-weight: bold;
|
| 164 |
-
border: 2px solid #a020f0;
|
| 165 |
-
font-family: 'Norwester', sans-serif;
|
| 166 |
-
animation: fadeIn 1s ease-in-out;
|
| 167 |
-
box-shadow: 0 0 10px #a020f0;
|
| 168 |
-
}
|
| 169 |
-
|
| 170 |
-
.gradio-button:hover {
|
| 171 |
-
background-color: #21262d;
|
| 172 |
-
border-color: #a020f0;
|
| 173 |
-
transform: scale(1.1);
|
| 174 |
-
transition: transform 0.2s ease-in-out;
|
| 175 |
-
}
|
| 176 |
-
|
| 177 |
-
.gradio-output {
|
| 178 |
-
background-color: #161b22;
|
| 179 |
-
color: #a020f0;
|
| 180 |
-
font-weight: bold;
|
| 181 |
-
font-family: 'Norwester', sans-serif;
|
| 182 |
-
animation: fadeIn 1s ease-in-out;
|
| 183 |
-
box-shadow: 0 0 10px #a020f0;
|
| 184 |
-
}
|
| 185 |
-
|
| 186 |
-
.gradio-input, .gradio-output, .gradio-textbox {
|
| 187 |
-
text-shadow: 0 0 10px #a020f0, 0 0 20px #a020f0, 0 0 30px #a020f0;
|
| 188 |
-
}
|
| 189 |
-
|
| 190 |
-
.gradio-textbox:focus {
|
| 191 |
-
border-color: #a020f0;
|
| 192 |
-
animation: blink-caret 0.8s step-end infinite;
|
| 193 |
-
}
|
| 194 |
-
|
| 195 |
-
@keyframes typing {
|
| 196 |
-
0% { width: 0; }
|
| 197 |
-
100% { width: 100%; }
|
| 198 |
-
}
|
| 199 |
-
|
| 200 |
-
@keyframes fadeIn {
|
| 201 |
-
0% { opacity: 0; }
|
| 202 |
-
100% { opacity: 1; }
|
| 203 |
-
}
|
| 204 |
-
|
| 205 |
-
@keyframes blink-caret {
|
| 206 |
-
50% { border-color: transparent; }
|
| 207 |
-
}
|
| 208 |
-
|
| 209 |
-
@keyframes move-background {
|
| 210 |
-
0% { background-position: 0 0; }
|
| 211 |
-
100% { background-position: 100% 100%; }
|
| 212 |
-
}
|
| 213 |
-
|
| 214 |
-
.gradio-container {
|
| 215 |
-
background: linear-gradient(45deg, #0d1117, #21262d, #161b22);
|
| 216 |
-
background-size: 400% 400%;
|
| 217 |
-
animation: move-background 10s ease infinite;
|
| 218 |
-
}
|
| 219 |
-
|
| 220 |
-
.gradio-chatbot .message {
|
| 221 |
-
background-color: #161b22;
|
| 222 |
-
color: #a020f0;
|
| 223 |
-
font-weight: bold;
|
| 224 |
-
font-family: 'Norwester', sans-serif;
|
| 225 |
-
border: 2px solid #a020f0;
|
| 226 |
-
animation: fadeIn 1s ease-in-out;
|
| 227 |
-
}
|
| 228 |
-
"""
|
| 229 |
-
|
| 230 |
-
with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
| 231 |
gr.Markdown("<p style='font-size: 78px;'>ONE_AI</p>")
|
| 232 |
chatbot = gr.Chatbot(type='messages')
|
| 233 |
state = gr.State([])
|
|
|
|
| 145 |
return format_history_for_gradio(history), history
|
| 146 |
|
| 147 |
|
| 148 |
+
def create_chatbot():
|
| 149 |
+
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
gr.Markdown("<p style='font-size: 78px;'>ONE_AI</p>")
|
| 151 |
chatbot = gr.Chatbot(type='messages')
|
| 152 |
state = gr.State([])
|