tywei08 commited on
Commit
5251c6f
·
verified ·
1 Parent(s): a4a9d93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -8
app.py CHANGED
@@ -123,19 +123,34 @@ with gr.Blocks(css='''
123
  text-transform: uppercase;
124
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
125
  transition: all 0.3s ease;
126
- outline: none; /* Add this to remove the outline on focus for some browsers */
127
  }
128
 
129
- .generate-button:hover {
130
  background: linear-gradient(to right, #E0FFFF, #FF6347, #F0E68C);
131
- box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
 
 
 
 
 
 
 
 
132
  }
133
 
134
  .generate-button:active {
135
- box-shadow: 0 0 15px rgba(30, 255, 255, 0.5),
136
- 0 0 20px rgba(30, 255, 255, 0.5) inset; /* Creates the glowing effect */
137
- transform: translateY(2px); /* Optional: Slightly push the button down */
 
 
 
 
 
 
138
  }
 
139
  ''') as demo:
140
 
141
  with gr.Row():
@@ -151,7 +166,7 @@ with gr.Blocks(css='''
151
  # <span></span>
152
  # </div>
153
  # ''')
154
- mood = gr.Textbox(label="Mood", elem_classes=["mood-input"])
155
  flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"])
156
  drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"])
157
 
@@ -160,7 +175,7 @@ with gr.Blocks(css='''
160
  sour = gr.Slider(label="Sour", minimum=0, maximum=10, elem_id="slider-sour")
161
  savory = gr.Slider(label="Savory", minimum=0, maximum=10, elem_id="slider-savory")
162
  bitter = gr.Slider(label="Bitter", minimum=0, maximum=10, elem_id="slider-bitter")
163
- soberness_level = gr.Slider(label="Level of Soberness", minimum=0, maximum=10, elem_id="slider-soberness_level")
164
 
165
  # with gr.Row():
166
  # flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"])
 
123
  text-transform: uppercase;
124
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
125
  transition: all 0.3s ease;
126
+ outline: none; /* Removes the outline on focus for some browsers */
127
  }
128
 
129
+ .generate-button:hover, .generate-button:active {
130
  background: linear-gradient(to right, #E0FFFF, #FF6347, #F0E68C);
131
+ /* Combines the glow from each color in the gradient */
132
+ box-shadow:
133
+ 0 0 15px rgba(240, 230, 140, 0.7),
134
+ 0 0 25px rgba(240, 230, 140, 0.7),
135
+ 0 0 15px rgba(224, 255, 255, 0.7),
136
+ 0 0 25px rgba(224, 255, 255, 0.7),
137
+ 0 0 15px rgba(255, 99, 71, 0.7),
138
+ 0 0 25px rgba(255, 99, 71, 0.7);
139
+ transform: translateY(2px); /* Optional: Slightly push the button down on active */
140
  }
141
 
142
  .generate-button:active {
143
+ /* You may want to add an extra inset shadow to give a sense of depth when clicked */
144
+ box-shadow:
145
+ 0 0 15px rgba(240, 230, 140, 0.7),
146
+ 0 0 25px rgba(240, 230, 140, 0.7),
147
+ 0 0 15px rgba(224, 255, 255, 0.7),
148
+ 0 0 25px rgba(224, 255, 255, 0.7),
149
+ 0 0 15px rgba(255, 99, 71, 0.7),
150
+ 0 0 25px rgba(255, 99, 71, 0.7),
151
+ 0 0 20px rgba(30, 255, 255, 0.5) inset;
152
  }
153
+
154
  ''') as demo:
155
 
156
  with gr.Row():
 
166
  # <span></span>
167
  # </div>
168
  # ''')
169
+ mood = gr.Textbox(label="How are you feeling today?", elem_classes=["mood-input"])
170
  flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"])
171
  drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"])
172
 
 
175
  sour = gr.Slider(label="Sour", minimum=0, maximum=10, elem_id="slider-sour")
176
  savory = gr.Slider(label="Savory", minimum=0, maximum=10, elem_id="slider-savory")
177
  bitter = gr.Slider(label="Bitter", minimum=0, maximum=10, elem_id="slider-bitter")
178
+ soberness_level = gr.Slider(label="Level of Soberness", minimum=0, maximum=10, value=10, elem_id="slider-soberness_level")
179
 
180
  # with gr.Row():
181
  # flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"])