Update app.py
Browse files
app.py
CHANGED
@@ -40,6 +40,30 @@ def respond(
|
|
40 |
yield response
|
41 |
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
"""
|
44 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
45 |
"""
|
@@ -57,6 +81,7 @@ demo = gr.ChatInterface(
|
|
57 |
label="Top-p (nucleus sampling)",visible=False
|
58 |
),
|
59 |
],
|
|
|
60 |
)
|
61 |
|
62 |
|
|
|
40 |
yield response
|
41 |
|
42 |
|
43 |
+
# CSS for styling the interface
|
44 |
+
css = """
|
45 |
+
body {
|
46 |
+
background-color: #121212; /* Dark background */
|
47 |
+
color: white; /* Text color for better visibility */
|
48 |
+
}
|
49 |
+
|
50 |
+
.gr-button {
|
51 |
+
background-color: white !important; /* White button color */
|
52 |
+
color: black !important; /* Black text for contrast */
|
53 |
+
border: none !important;
|
54 |
+
padding: 8px 16px !important;
|
55 |
+
border-radius: 5px !important;
|
56 |
+
}
|
57 |
+
|
58 |
+
.gr-button:hover {
|
59 |
+
background-color: #e0e0e0 !important; /* Slightly lighter button on hover */
|
60 |
+
}
|
61 |
+
|
62 |
+
.gr-slider-container {
|
63 |
+
color: white !important; /* Slider labels in white */
|
64 |
+
}
|
65 |
+
"""
|
66 |
+
|
67 |
"""
|
68 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
69 |
"""
|
|
|
81 |
label="Top-p (nucleus sampling)",visible=False
|
82 |
),
|
83 |
],
|
84 |
+
css=css, # Pass the custom CSS here
|
85 |
)
|
86 |
|
87 |
|