Fix css injection
Browse files
app.py
CHANGED
|
@@ -77,39 +77,42 @@ def chat_fn(message, history, persona_name):
|
|
| 77 |
# Gradio UI
|
| 78 |
# ==============================
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
}
|
| 88 |
-
button.primary
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
}
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
gr.Markdown(
|
| 115 |
"""
|
|
|
|
| 77 |
# Gradio UI
|
| 78 |
# ==============================
|
| 79 |
|
| 80 |
+
with gr.Blocks() as demo:
|
| 81 |
+
|
| 82 |
+
# Inject custom CSS
|
| 83 |
+
gr.HTML("""
|
| 84 |
+
<style>
|
| 85 |
+
.gradio-container {
|
| 86 |
+
background-color: #F5FAFF !important;
|
| 87 |
+
}
|
| 88 |
+
button.primary {
|
| 89 |
+
background-color: #1A73E8 !important;
|
| 90 |
+
border-color: #1A73E8 !important;
|
| 91 |
+
}
|
| 92 |
+
button.primary:hover {
|
| 93 |
+
background-color: #1557B0 !important;
|
| 94 |
+
}
|
| 95 |
+
.message.user {
|
| 96 |
+
background-color: #EDEDED !important;
|
| 97 |
+
}
|
| 98 |
+
.message.bot {
|
| 99 |
+
background-color: #E8F1FF !important;
|
| 100 |
+
}
|
| 101 |
+
h1 {
|
| 102 |
+
color: #1A73E8 !important;
|
| 103 |
+
text-align: center;
|
| 104 |
+
}
|
| 105 |
+
.gr-markdown {
|
| 106 |
+
text-align: center;
|
| 107 |
+
}
|
| 108 |
+
.gr-radio {
|
| 109 |
+
background-color: white;
|
| 110 |
+
padding: 15px;
|
| 111 |
+
border-radius: 8px;
|
| 112 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
| 113 |
+
}
|
| 114 |
+
</style>
|
| 115 |
+
""")
|
| 116 |
|
| 117 |
gr.Markdown(
|
| 118 |
"""
|