Spaces:
Sleeping
Sleeping
Daniel Nichols
commited on
Commit
•
9504fd5
1
Parent(s):
d672eb0
disable download button on reprompt
Browse files- src/perfguru.py +3 -2
src/perfguru.py
CHANGED
@@ -70,13 +70,14 @@ def chat_with_llms(prompt, code_files, profile_file, profile_type):
|
|
70 |
source2 = gr.Markdown(f"{model2.name} + {formatter2.name}", visible=False, elem_classes=[])
|
71 |
|
72 |
# set vote buttons to deactive
|
|
|
73 |
vote_buttons = gr.Button(interactive=False), gr.Button(interactive=False), gr.Button(interactive=False), gr.Button(interactive=False)
|
74 |
|
75 |
for c1, c2 in zip_longest(response1, response2):
|
76 |
yield c1 or gr.Textbox(), source1, formatted1, c2 or gr.Textbox(), source2, formatted2, *vote_buttons
|
77 |
|
78 |
vote_buttons = gr.Button(interactive=True), gr.Button(interactive=True), gr.Button(interactive=True), gr.Button(interactive=True)
|
79 |
-
yield c1 or gr.Textbox(), source1, formatted1, c2 or gr.Textbox(), source2, formatted2, *vote_buttons
|
80 |
|
81 |
def get_interaction_log(prompt, vote, response1, model1, formatter1, full_prompt1, response2, model2, formatter2, full_prompt2):
|
82 |
log = {
|
@@ -176,7 +177,7 @@ with gr.Blocks(css=".not-voted p { color: black; } .voted p { color: green; } .r
|
|
176 |
chat_button.click(
|
177 |
chat_with_llms,
|
178 |
inputs=[prompt, code_files, profile_file, profile_type],
|
179 |
-
outputs=[response1, source1, full_prompt1, response2, source2, full_prompt2, *vote_btns]
|
180 |
)
|
181 |
|
182 |
# Launch the Gradio interface
|
|
|
70 |
source2 = gr.Markdown(f"{model2.name} + {formatter2.name}", visible=False, elem_classes=[])
|
71 |
|
72 |
# set vote buttons to deactive
|
73 |
+
download_btn = gr.Button(interactive=False)
|
74 |
vote_buttons = gr.Button(interactive=False), gr.Button(interactive=False), gr.Button(interactive=False), gr.Button(interactive=False)
|
75 |
|
76 |
for c1, c2 in zip_longest(response1, response2):
|
77 |
yield c1 or gr.Textbox(), source1, formatted1, c2 or gr.Textbox(), source2, formatted2, *vote_buttons
|
78 |
|
79 |
vote_buttons = gr.Button(interactive=True), gr.Button(interactive=True), gr.Button(interactive=True), gr.Button(interactive=True)
|
80 |
+
yield c1 or gr.Textbox(), source1, formatted1, c2 or gr.Textbox(), source2, formatted2, download_btn, *vote_buttons
|
81 |
|
82 |
def get_interaction_log(prompt, vote, response1, model1, formatter1, full_prompt1, response2, model2, formatter2, full_prompt2):
|
83 |
log = {
|
|
|
177 |
chat_button.click(
|
178 |
chat_with_llms,
|
179 |
inputs=[prompt, code_files, profile_file, profile_type],
|
180 |
+
outputs=[response1, source1, full_prompt1, response2, source2, full_prompt2, download_btn, *vote_btns]
|
181 |
)
|
182 |
|
183 |
# Launch the Gradio interface
|