Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
•
f664ce2
1
Parent(s):
162b68f
update
Browse files- pages/arena.py +10 -3
pages/arena.py
CHANGED
@@ -2,9 +2,6 @@
|
|
2 |
import random
|
3 |
import gradio as gr
|
4 |
import json
|
5 |
-
import logging
|
6 |
-
import gc
|
7 |
-
import torch
|
8 |
|
9 |
from utils.data import dataset
|
10 |
from utils.multiple_stream import stream_data
|
@@ -39,6 +36,16 @@ def create_arena():
|
|
39 |
show_progress=False
|
40 |
)
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
return demo
|
43 |
|
44 |
if __name__ == "__main__":
|
|
|
2 |
import random
|
3 |
import gradio as gr
|
4 |
import json
|
|
|
|
|
|
|
5 |
|
6 |
from utils.data import dataset
|
7 |
from utils.multiple_stream import stream_data
|
|
|
36 |
show_progress=False
|
37 |
)
|
38 |
|
39 |
+
choice = gr.Radio(label="Choose the best response:", choices=["Response 1", "Response 2", "Response 3"])
|
40 |
+
|
41 |
+
submit_button = gr.Button("Submit")
|
42 |
+
|
43 |
+
submit_button.click(
|
44 |
+
#fn=lambda response1, response2, response3, choice: save_to_db(eval(choice.lower())),
|
45 |
+
inputs=[choice],
|
46 |
+
outputs=f"Response '{choice}' saved successfully!"
|
47 |
+
)
|
48 |
+
|
49 |
return demo
|
50 |
|
51 |
if __name__ == "__main__":
|