tywei08 commited on
Commit
97750f2
·
verified ·
1 Parent(s): 698b0ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -3
app.py CHANGED
@@ -99,6 +99,38 @@ with gr.Blocks(css='''
99
  max-width: 500px; /* Maximum width of the image */
100
  width: 100%;
101
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  .generate-button {
103
  background: linear-gradient(to right, #F0E68C, #E0FFFF, #FF6347);
104
  color: black;
@@ -156,9 +188,9 @@ with gr.Blocks(css='''
156
  # <span></span>
157
  # </div>
158
  # ''')
159
- mood = gr.Textbox(label="How are you feeling today?", elem_classes=["mood-input"])
160
- flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"])
161
- drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"])
162
 
163
  with gr.Row():
164
  sweetness = gr.Slider(label="Sweetness", minimum=0, maximum=10, elem_id="slider-sweetness")
 
99
  max-width: 500px; /* Maximum width of the image */
100
  width: 100%;
101
  }
102
+ .custom-input {
103
+ background: white; /* Or any color you'd like */
104
+ color: #333; /* Text color */
105
+ padding: 10px; /* Padding inside the input */
106
+ border: 2px solid #ddd; /* Border color */
107
+ border-radius: 5px; /* Rounded corners */
108
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
109
+ transition: all 0.3s ease; /* Smooth transition for interactions */
110
+ }
111
+
112
+ .custom-input:focus {
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
+
117
+ .custom-checkbox-group {
118
+ background: white;
119
+ padding: 10px;
120
+ border: 2px solid #ddd;
121
+ border-radius: 5px;
122
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
123
+ }
124
+
125
+ .custom-checkbox-group input[type="checkbox"] + label {
126
+ margin-right: 10px; /* Space between checkboxes */
127
+ cursor: pointer; /* Mouse pointer changes to indicate clickable area */
128
+ }
129
+
130
+ .custom-checkbox-group input[type="checkbox"]:checked + label {
131
+ color: #FF6347; /* Text color when checkbox is checked */
132
+ font-weight: bold;
133
+ }
134
  .generate-button {
135
  background: linear-gradient(to right, #F0E68C, #E0FFFF, #FF6347);
136
  color: black;
 
188
  # <span></span>
189
  # </div>
190
  # ''')
191
+ mood = gr.Textbox(label="How are you feeling today?", elem_classes=["custom-input"])
192
+ flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"], elem_classes=["custom-checkbox-group"])
193
+ drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"], elem_classes=["custom-checkbox-group"])
194
 
195
  with gr.Row():
196
  sweetness = gr.Slider(label="Sweetness", minimum=0, maximum=10, elem_id="slider-sweetness")