wenkai commited on
Commit
54f95a1
Β·
verified Β·
1 Parent(s): d661ecc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -27
app.py CHANGED
@@ -244,28 +244,12 @@ css = """
244
  overflow: auto;
245
  border: 1px solid #ccc;
246
  }
247
- /* Style for the upvote button */
248
- .warning {
249
- width: 100%;
250
- max-width: 300px;
251
- margin: 0 auto;
252
- }
253
- .upvote-button {
254
- width: 500px; /* Set button width */
255
- height: 50px; /* Set button height */
256
- font-size: 20px; /* Set font size */
257
- background-color: #d4edda; /* Set background color */
258
- border-radius: 5px; /* Rounded corners */
259
- }
260
-
261
- /* Style for the downvote button */
262
- .downvote-button {
263
- width: 50px; /* Set button width */
264
- height: 50px; /* Set button height */
265
- font-size: 20px; /* Set font size */
266
- background-color: #f8d7da; /* Set background color */
267
- border-radius: 5px; /* Rounded corners */
268
- }
269
  .feedback {
270
  width: 40px; /* Set button width */
271
  height: 40px; /* Set button height */
@@ -282,16 +266,16 @@ with gr.Blocks(css=css) as demo:
282
  with gr.Column():
283
  input_protein = gr.Textbox(type="text", label="Upload sequence")
284
  prompt = gr.Textbox(type="text", label="Taxonomy Prompt (Optional)")
285
- submit_btn = gr.Button(value="Submit")
286
  with gr.Column():
287
  # output_text = gr.Textbox(label="Output Text")
288
  with gr.Accordion('Prediction:', open=True):
289
  output_markdown = gr.Markdown(label="Output")
290
  with gr.Row():
291
- with gr.Column():
292
- upvote_button = gr.Button("πŸ‘", elem_classes=["warning"])
293
- with gr.Column():
294
- downvote_button = gr.Button("πŸ‘Ž", elem_classes=["warning"])
295
  with gr.Column():
296
  vote_markdown = gr.Markdown(label="Output")
297
  with gr.Column():
 
244
  overflow: auto;
245
  border: 1px solid #ccc;
246
  }
247
+ /* Style for the upvote button */
248
+ .upvote-button, .downvote-button, .submit-btn {
249
+ flex: 1; /* Allow buttons to grow equally */
250
+ margin: 0 5px; /* Add some margin for spacing */
251
+ max-width: calc(50% - 10px); /* Ensure they are half width minus margin */
252
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  .feedback {
254
  width: 40px; /* Set button width */
255
  height: 40px; /* Set button height */
 
266
  with gr.Column():
267
  input_protein = gr.Textbox(type="text", label="Upload sequence")
268
  prompt = gr.Textbox(type="text", label="Taxonomy Prompt (Optional)")
269
+ submit_btn = gr.Button(value="Submit", elem_classes=["submit-btn"])
270
  with gr.Column():
271
  # output_text = gr.Textbox(label="Output Text")
272
  with gr.Accordion('Prediction:', open=True):
273
  output_markdown = gr.Markdown(label="Output")
274
  with gr.Row():
275
+ # with gr.Column():
276
+ upvote_button = gr.Button("πŸ‘", elem_classes=["upvote-button"])
277
+ # with gr.Column():
278
+ downvote_button = gr.Button("πŸ‘Ž", elem_classes=["downvote-button"])
279
  with gr.Column():
280
  vote_markdown = gr.Markdown(label="Output")
281
  with gr.Column():