Update app.py
Browse files
app.py
CHANGED
@@ -245,17 +245,31 @@ css = """
|
|
245 |
border: 1px solid #ccc;
|
246 |
}
|
247 |
/* Style for the upvote button */
|
248 |
-
.
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
.feedback {
|
254 |
width: 40px; /* Set button width */
|
255 |
height: 40px; /* Set button height */
|
256 |
font-size: 16px; /* Set font size */
|
257 |
background-color: #f8d7da; /* Set background color */
|
258 |
-
}
|
259 |
"""
|
260 |
|
261 |
with gr.Blocks(css=css) as demo:
|
@@ -266,20 +280,33 @@ with gr.Blocks(css=css) as demo:
|
|
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")
|
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 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
with gr.Row():
|
284 |
inputs = gr.Textbox(type="text", label="Your feedback")
|
285 |
feedback_markdown = gr.Markdown(label="Output")
|
|
|
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 |
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")
|