Spaces:
Sleeping
Sleeping
Antonela Tamagnini commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,6 +36,46 @@ def respond(
|
|
| 36 |
response += token
|
| 37 |
yield response
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
# Gradio interface with additional components
|
| 40 |
demo = gr.ChatInterface(
|
| 41 |
respond,
|
|
|
|
| 36 |
response += token
|
| 37 |
yield response
|
| 38 |
|
| 39 |
+
# Custom CSS for styling the Submit button and other elements
|
| 40 |
+
custom_css = """
|
| 41 |
+
body {
|
| 42 |
+
background-color: #f0f8ff; /* Light blue background for the whole interface */
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
.gradio-container {
|
| 46 |
+
border-radius: 10px; /* Rounded corners for the whole Gradio interface */
|
| 47 |
+
padding: 20px;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
#header {
|
| 51 |
+
display: flex;
|
| 52 |
+
align-items: center;
|
| 53 |
+
justify-content: space-between;
|
| 54 |
+
margin-bottom: 20px; /* Adds space below the header */
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
#logo {
|
| 58 |
+
height: 50px; /* Logo size */
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
/* Style the Submit button */
|
| 62 |
+
.gr-button {
|
| 63 |
+
background-color: #4CAF50 !important; /* Green background for the button */
|
| 64 |
+
color: white !important; /* White text color */
|
| 65 |
+
font-family: 'Arial', sans-serif !important; /* Custom font for the button text */
|
| 66 |
+
font-size: 16px !important; /* Font size */
|
| 67 |
+
padding: 10px 20px !important; /* Padding for the button */
|
| 68 |
+
border-radius: 5px !important; /* Rounded corners for the button */
|
| 69 |
+
border: none !important; /* Remove border */
|
| 70 |
+
cursor: pointer !important; /* Change cursor on hover */
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
/* Style the Submit button on hover */
|
| 74 |
+
.gr-button:hover {
|
| 75 |
+
background-color: #45a049 !important; /* Darker green on hover */
|
| 76 |
+
}
|
| 77 |
+
"""
|
| 78 |
+
|
| 79 |
# Gradio interface with additional components
|
| 80 |
demo = gr.ChatInterface(
|
| 81 |
respond,
|