Update app.py
Browse files
app.py
CHANGED
@@ -431,9 +431,20 @@ def show_chats(idx, df, file, all_check):
|
|
431 |
return chat_a, chat_b, label, *scores, loss
|
432 |
|
433 |
|
434 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
|
436 |
-
|
|
|
|
|
437 |
|
438 |
gr.Markdown(
|
439 |
"""
|
@@ -497,4 +508,5 @@ with gr.Blocks() as demo:
|
|
497 |
next_btn.click(lambda x: x + 1, inputs=idx, outputs=idx)
|
498 |
|
499 |
|
500 |
-
|
|
|
|
431 |
return chat_a, chat_b, label, *scores, loss
|
432 |
|
433 |
|
434 |
+
def show_split(text):
|
435 |
+
if len(text) == 0:
|
436 |
+
gr.Markdown("## No Input Provided")
|
437 |
+
else:
|
438 |
+
for letter in text:
|
439 |
+
with gr.Row():
|
440 |
+
text = gr.Textbox(letter)
|
441 |
+
btn = gr.Button("Clear")
|
442 |
+
btn.click(lambda: gr.Textbox(value=""), None, text)
|
443 |
+
|
444 |
|
445 |
+
|
446 |
+
|
447 |
+
with gr.Blocks() as demo:
|
448 |
|
449 |
gr.Markdown(
|
450 |
"""
|
|
|
508 |
next_btn.click(lambda x: x + 1, inputs=idx, outputs=idx)
|
509 |
|
510 |
|
511 |
+
if __name__ == "__main__":
|
512 |
+
demo.launch(debug=True)
|