Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,7 +100,7 @@ with gr.Blocks(css='''
|
|
| 100 |
width: 100%;
|
| 101 |
}
|
| 102 |
.custom-input {
|
| 103 |
-
background: linear-gradient(to right, #
|
| 104 |
opacity: 0.8
|
| 105 |
color: #333; /* Text color */
|
| 106 |
padding: 10px; /* Padding inside the input */
|
|
@@ -113,18 +113,33 @@ with gr.Blocks(css='''
|
|
| 113 |
border-color: #F0E68C; /* Highlight color when the input is focused */
|
| 114 |
box-shadow: 0 0 8px rgba(240, 230, 140, 0.8); /* Glow effect on focus */
|
| 115 |
}
|
| 116 |
-
.custom-checkbox-
|
| 117 |
-
background:
|
| 118 |
padding: 10px;
|
| 119 |
border: 2px solid #ddd;
|
| 120 |
border-radius: 5px;
|
| 121 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 122 |
}
|
| 123 |
-
.custom-checkbox-
|
| 124 |
margin-right: 10px; /* Space between checkboxes */
|
| 125 |
cursor: pointer; /* Mouse pointer changes to indicate clickable area */
|
| 126 |
}
|
| 127 |
-
.custom-checkbox-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
color: #FF6347; /* Text color when checkbox is checked */
|
| 129 |
font-weight: bold;
|
| 130 |
}
|
|
@@ -186,8 +201,8 @@ with gr.Blocks(css='''
|
|
| 186 |
# </div>
|
| 187 |
# ''')
|
| 188 |
mood = gr.Textbox(label="How are you feeling today?", elem_classes=["custom-input"])
|
| 189 |
-
flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"], elem_classes=["custom-checkbox-
|
| 190 |
-
drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"], elem_classes=["custom-checkbox-
|
| 191 |
|
| 192 |
with gr.Row():
|
| 193 |
sweetness = gr.Slider(label="Sweetness", minimum=0, maximum=10, elem_id="slider-sweetness")
|
|
|
|
| 100 |
width: 100%;
|
| 101 |
}
|
| 102 |
.custom-input {
|
| 103 |
+
background: linear-gradient(to right, #E8F3D6, #FCF9BE); /* Or any color you'd like */
|
| 104 |
opacity: 0.8
|
| 105 |
color: #333; /* Text color */
|
| 106 |
padding: 10px; /* Padding inside the input */
|
|
|
|
| 113 |
border-color: #F0E68C; /* Highlight color when the input is focused */
|
| 114 |
box-shadow: 0 0 8px rgba(240, 230, 140, 0.8); /* Glow effect on focus */
|
| 115 |
}
|
| 116 |
+
.custom-checkbox-group1 {
|
| 117 |
+
background: linear-gradient(to right, #FCF9BE, #FFDCA9);
|
| 118 |
padding: 10px;
|
| 119 |
border: 2px solid #ddd;
|
| 120 |
border-radius: 5px;
|
| 121 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 122 |
}
|
| 123 |
+
.custom-checkbox-group1 input[type="checkbox"] + label {
|
| 124 |
margin-right: 10px; /* Space between checkboxes */
|
| 125 |
cursor: pointer; /* Mouse pointer changes to indicate clickable area */
|
| 126 |
}
|
| 127 |
+
.custom-checkbox-group1 input[type="checkbox"]:checked + label {
|
| 128 |
+
color: #FF6347; /* Text color when checkbox is checked */
|
| 129 |
+
font-weight: bold;
|
| 130 |
+
}
|
| 131 |
+
.custom-checkbox-group2 {
|
| 132 |
+
background: linear-gradient(to right, #FFDCA9, #FAAB78);
|
| 133 |
+
padding: 10px;
|
| 134 |
+
border: 2px solid #ddd;
|
| 135 |
+
border-radius: 5px;
|
| 136 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 137 |
+
}
|
| 138 |
+
.custom-checkbox-group2 input[type="checkbox"] + label {
|
| 139 |
+
margin-right: 10px; /* Space between checkboxes */
|
| 140 |
+
cursor: pointer; /* Mouse pointer changes to indicate clickable area */
|
| 141 |
+
}
|
| 142 |
+
.custom-checkbox-group2 input[type="checkbox"]:checked + label {
|
| 143 |
color: #FF6347; /* Text color when checkbox is checked */
|
| 144 |
font-weight: bold;
|
| 145 |
}
|
|
|
|
| 201 |
# </div>
|
| 202 |
# ''')
|
| 203 |
mood = gr.Textbox(label="How are you feeling today?", elem_classes=["custom-input"])
|
| 204 |
+
flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"], elem_classes=["custom-checkbox-group1"])
|
| 205 |
+
drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"], elem_classes=["custom-checkbox-group2"])
|
| 206 |
|
| 207 |
with gr.Row():
|
| 208 |
sweetness = gr.Slider(label="Sweetness", minimum=0, maximum=10, elem_id="slider-sweetness")
|