Spaces:
Sleeping
Sleeping
Remove Button update
Browse files
app.py
CHANGED
@@ -411,8 +411,8 @@ def retrieveSentences(gr1, gr2, att1, att2, progress=gr.Progress()):
|
|
411 |
gr.Accordion(visible=bias_gen_states[1], label=f"Test sentences ({len(test_sentences)})"), # update
|
412 |
gr.update(visible=True), # Row sentences
|
413 |
gr.DataFrame(value=test_sentences), #update DataFrame test sentences
|
414 |
-
gr.Button
|
415 |
-
gr.Button
|
416 |
gr.update(value=', '.join(g1)), # gr1_fixed
|
417 |
gr.update(value=', '.join(g2)), # gr2_fixed
|
418 |
gr.update(value=', '.join(a1)), # att1_fixed
|
@@ -609,9 +609,9 @@ def startBiasTest(test_sentences_df, gr1, gr2, att1, att2, model_name, progress=
|
|
609 |
|
610 |
return (err_update, # error message
|
611 |
gr.Markdown(visible=True), # update # bar progress
|
612 |
-
gr.Button
|
613 |
-
gr.Button
|
614 |
-
gr.Button
|
615 |
gr.update(visible=tabs[0]), # content tab/column 1
|
616 |
gr.update(visible=tabs[1]), # content tab/column 2
|
617 |
gr.update(visible=tabs[2]), # content tab/column 3
|
@@ -680,7 +680,7 @@ def export_csv(test_pairs, gr1, gr2, att1, att2):
|
|
680 |
def useOnlineGen(value):
|
681 |
online_gen_row_update = gr.Row.update(visible=False)
|
682 |
num_sentences2gen_update = gr.Slider.update(visible=False)
|
683 |
-
gen_btn_update = gr.Button
|
684 |
|
685 |
gen_title_update = gr.Markdown(visible=False) #update
|
686 |
openai_key_update = gr.Textbox.update(visible=False)
|
@@ -689,7 +689,7 @@ def useOnlineGen(value):
|
|
689 |
print("Check is true...")
|
690 |
online_gen_row_update = gr.Row.update(visible=True)
|
691 |
num_sentences2gen_update = gr.Slider.update(visible=True)
|
692 |
-
gen_btn_update = gr.Button
|
693 |
|
694 |
gen_title_update = gr.Markdown(visible=True) # update
|
695 |
openai_key_update = gr.Textbox.update(visible=True)
|
|
|
411 |
gr.Accordion(visible=bias_gen_states[1], label=f"Test sentences ({len(test_sentences)})"), # update
|
412 |
gr.update(visible=True), # Row sentences
|
413 |
gr.DataFrame(value=test_sentences), #update DataFrame test sentences
|
414 |
+
gr.Button(visible=bias_gen_states[0], value=bias_gen_label), # update gen btn
|
415 |
+
gr.Button(visible=bias_gen_states[1], value=bias_test_label), # update bias test btn
|
416 |
gr.update(value=', '.join(g1)), # gr1_fixed
|
417 |
gr.update(value=', '.join(g2)), # gr2_fixed
|
418 |
gr.update(value=', '.join(a1)), # att1_fixed
|
|
|
609 |
|
610 |
return (err_update, # error message
|
611 |
gr.Markdown(visible=True), # update # bar progress
|
612 |
+
gr.Button(variant=variants[0], interactive=inter[0]), # update top breadcrumb button 1
|
613 |
+
gr.Button(variant=variants[1], interactive=inter[1]), # update top breadcrumb button 2
|
614 |
+
gr.Button(variant=variants[2], interactive=inter[2]), # update top breadcrumb button 3
|
615 |
gr.update(visible=tabs[0]), # content tab/column 1
|
616 |
gr.update(visible=tabs[1]), # content tab/column 2
|
617 |
gr.update(visible=tabs[2]), # content tab/column 3
|
|
|
680 |
def useOnlineGen(value):
|
681 |
online_gen_row_update = gr.Row.update(visible=False)
|
682 |
num_sentences2gen_update = gr.Slider.update(visible=False)
|
683 |
+
gen_btn_update = gr.Button(visible=False) #update
|
684 |
|
685 |
gen_title_update = gr.Markdown(visible=False) #update
|
686 |
openai_key_update = gr.Textbox.update(visible=False)
|
|
|
689 |
print("Check is true...")
|
690 |
online_gen_row_update = gr.Row.update(visible=True)
|
691 |
num_sentences2gen_update = gr.Slider.update(visible=True)
|
692 |
+
gen_btn_update = gr.Button(visible=True, value="Generate Additional Sentences") #update
|
693 |
|
694 |
gen_title_update = gr.Markdown(visible=True) # update
|
695 |
openai_key_update = gr.Textbox.update(visible=True)
|