Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,9 +40,19 @@ def respond(
|
|
| 40 |
yield response
|
| 41 |
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
"""
|
| 44 |
-
|
| 45 |
-
"""
|
| 46 |
chatbot = gr.ChatInterface(
|
| 47 |
respond,
|
| 48 |
type="messages",
|
|
@@ -60,7 +70,7 @@ chatbot = gr.ChatInterface(
|
|
| 60 |
],
|
| 61 |
)
|
| 62 |
|
| 63 |
-
with gr.Blocks() as demo:
|
| 64 |
with gr.Sidebar():
|
| 65 |
gr.LoginButton()
|
| 66 |
chatbot.render()
|
|
|
|
| 40 |
yield response
|
| 41 |
|
| 42 |
|
| 43 |
+
theme = gr.themes.Soft(
|
| 44 |
+
primary_hue="indigo",
|
| 45 |
+
secondary_hue="violet",
|
| 46 |
+
).set(
|
| 47 |
+
button_primary_background_fill="*primary_500",
|
| 48 |
+
button_primary_text_color="white",
|
| 49 |
+
)
|
| 50 |
+
|
| 51 |
+
css = """
|
| 52 |
+
h1 { text-align: center; color: #4f46e5; font-size: 2em; margin-bottom: 0.5em; }
|
| 53 |
+
.login-text { font-size: 0.9em; color: #666; text-align: center; margin-top: 5px; }
|
| 54 |
"""
|
| 55 |
+
|
|
|
|
| 56 |
chatbot = gr.ChatInterface(
|
| 57 |
respond,
|
| 58 |
type="messages",
|
|
|
|
| 70 |
],
|
| 71 |
)
|
| 72 |
|
| 73 |
+
with gr.Blocks(theme=theme, css=css) as demo:
|
| 74 |
with gr.Sidebar():
|
| 75 |
gr.LoginButton()
|
| 76 |
chatbot.render()
|