wenkai commited on
Commit
106f1cd
ยท
verified ยท
1 Parent(s): 6789f7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -42
app.py CHANGED
@@ -244,32 +244,29 @@ css = """
244
  overflow: auto;
245
  border: 1px solid #ccc;
246
  }
247
- /* Style for the upvote button */
248
- .submit-btn {
249
- width: 100%;
250
- }
251
-
252
- .vote-container {
253
- display: flex;
254
- width: 100%;
255
- gap: 10px;
256
- }
257
-
258
- .vote-buttons {
259
- display: flex;
260
- width: 100%;
261
- gap: 10px;
262
- }
263
 
264
- .vote-btn {
265
- flex: 1;
 
 
 
 
 
266
  }
267
  .feedback {
268
  width: 40px; /* Set button width */
269
  height: 40px; /* Set button height */
270
  font-size: 16px; /* Set font size */
271
  background-color: #f8d7da; /* Set background color */
272
- }
273
  """
274
 
275
  with gr.Blocks(css=css) as demo:
@@ -280,33 +277,20 @@ with gr.Blocks(css=css) as demo:
280
  with gr.Column():
281
  input_protein = gr.Textbox(type="text", label="Upload sequence")
282
  prompt = gr.Textbox(type="text", label="Taxonomy Prompt (Optional)")
283
- submit_btn = gr.Button(value="Submit", elem_classes=["submit-btn"])
284
  with gr.Column():
285
  # output_text = gr.Textbox(label="Output Text")
286
  with gr.Accordion('Prediction:', open=True):
287
  output_markdown = gr.Markdown(label="Output")
288
- # with gr.Row():
289
- # with gr.Column():
290
- # upvote_button = gr.Button("๐Ÿ‘")
291
- # with gr.Column():
292
- # downvote_button = gr.Button("๐Ÿ‘Ž")
293
- # with gr.Column():
294
- # vote_markdown = gr.Markdown(label="Output")
295
- # with gr.Column():
296
- # vote_temp = gr.Markdown()
297
- # ๆŠ•็ฅจๆŒ‰้’ฎๅ’Œๅ†…ๅฎน็š„ๅฎนๅ™จ
298
- with gr.Row(elem_classes=["vote-container"]):
299
- # ๆŠ•็ฅจๆŒ‰้’ฎ็ป„
300
- with gr.Column(scale=1, elem_classes=["vote-buttons"]):
301
- with gr.Row():
302
- upvote_button = gr.Button("๐Ÿ‘", elem_classes=["vote-btn"])
303
- downvote_button = gr.Button("๐Ÿ‘Ž", elem_classes=["vote-btn"])
304
-
305
- # ๆŠ•็ฅจ็›ธๅ…ณๅ†…ๅฎน
306
- with gr.Column(scale=3, elem_classes=["vote-content"]):
307
- with gr.Row():
308
- vote_markdown = gr.Markdown(label="Output")
309
- vote_temp = gr.Markdown()
310
  with gr.Row():
311
  inputs = gr.Textbox(type="text", label="Your feedback")
312
  feedback_markdown = gr.Markdown(label="Output")
@@ -338,3 +322,4 @@ with gr.Blocks(css=css) as demo:
338
 
339
  demo.launch(debug=True)
340
 
 
 
244
  overflow: auto;
245
  border: 1px solid #ccc;
246
  }
247
+ /* Style for the upvote button */
248
+ .upvote-button {
249
+ width: 500px; /* Set button width */
250
+ height: 50px; /* Set button height */
251
+ font-size: 20px; /* Set font size */
252
+ background-color: #d4edda; /* Set background color */
253
+ border-radius: 5px; /* Rounded corners */
254
+ }
 
 
 
 
 
 
 
 
255
 
256
+ /* Style for the downvote button */
257
+ .downvote-button {
258
+ width: 50px; /* Set button width */
259
+ height: 50px; /* Set button height */
260
+ font-size: 20px; /* Set font size */
261
+ background-color: #f8d7da; /* Set background color */
262
+ border-radius: 5px; /* Rounded corners */
263
  }
264
  .feedback {
265
  width: 40px; /* Set button width */
266
  height: 40px; /* Set button height */
267
  font-size: 16px; /* Set font size */
268
  background-color: #f8d7da; /* Set background color */
269
+ }
270
  """
271
 
272
  with gr.Blocks(css=css) as demo:
 
277
  with gr.Column():
278
  input_protein = gr.Textbox(type="text", label="Upload sequence")
279
  prompt = gr.Textbox(type="text", label="Taxonomy Prompt (Optional)")
280
+ submit_btn = gr.Button(value="Submit")
281
  with gr.Column():
282
  # output_text = gr.Textbox(label="Output Text")
283
  with gr.Accordion('Prediction:', open=True):
284
  output_markdown = gr.Markdown(label="Output")
285
+ with gr.Row():
286
+ with gr.Column():
287
+ upvote_button = gr.Button("๐Ÿ‘")
288
+ with gr.Column():
289
+ downvote_button = gr.Button("๐Ÿ‘Ž")
290
+ with gr.Column():
291
+ vote_markdown = gr.Markdown(label="Output")
292
+ with gr.Column():
293
+ vote_temp = gr.Markdown()
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  with gr.Row():
295
  inputs = gr.Textbox(type="text", label="Your feedback")
296
  feedback_markdown = gr.Markdown(label="Output")
 
322
 
323
  demo.launch(debug=True)
324
 
325
+