Spaces:
Runtime error
Runtime error
Linoy Tsaban
commited on
Commit
•
083c46e
1
Parent(s):
2499229
Update app.py
Browse files
app.py
CHANGED
@@ -375,6 +375,8 @@ with gr.Blocks(css="style.css") as demo:
|
|
375 |
gr.update(interactive=True, value=""),
|
376 |
gr.update(visible=False,label = guidance_scale_label),
|
377 |
gr.update(interactive=True, value =False),
|
|
|
|
|
378 |
gr.update(visible=True),
|
379 |
enable_interactive,
|
380 |
row1_visibility,
|
@@ -385,6 +387,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
385 |
)
|
386 |
|
387 |
|
|
|
388 |
def update_display_concept(button_label, edit_concept, neg_guidance, sega_concepts_counter):
|
389 |
sega_concepts_counter += 1
|
390 |
guidance_scale_label = "Concept Guidance Scale"
|
@@ -658,13 +661,13 @@ with gr.Blocks(css="style.css") as demo:
|
|
658 |
|
659 |
remove_concept1.click(
|
660 |
fn=update_counter,inputs=[sega_concepts_counter,edit_concept_1,edit_concept_2,edit_concept_3], outputs=sega_concepts_counter).then(
|
661 |
-
fn = remove_concept, inputs=[sega_concepts_counter,gr.State(1)], outputs= [box1, concept_1, edit_concept_1, guidnace_scale_1,neg_guidance_1, add_1, dropdown1, row1, row2, row3, row4, sega_concepts_counter],queue=False)
|
662 |
remove_concept2.click(
|
663 |
fn=update_counter,inputs=[sega_concepts_counter,edit_concept_1,edit_concept_2,edit_concept_3], outputs=sega_concepts_counter).then(
|
664 |
-
fn = remove_concept, inputs=[sega_concepts_counter,gr.State(2)], outputs=[box2, concept_2, edit_concept_2, guidnace_scale_2,neg_guidance_2, add_2 , dropdown2, row1, row2, row3, row4, sega_concepts_counter],queue=False)
|
665 |
remove_concept3.click(
|
666 |
fn=update_counter,inputs=[sega_concepts_counter,edit_concept_1,edit_concept_2,edit_concept_3], outputs=sega_concepts_counter).then(
|
667 |
-
fn = remove_concept,inputs=[sega_concepts_counter,gr.State(3)], outputs=[box3, concept_3, edit_concept_3, guidnace_scale_3,neg_guidance_3, add_3, dropdown3, row1, row2, row3, row4, sega_concepts_counter],queue=False)
|
668 |
|
669 |
#add_concept_button.click(fn = update_display_concept, inputs=sega_concepts_counter,
|
670 |
# outputs= [row2, row2_advanced, row3, row3_advanced, add_concept_button, sega_concepts_counter], queue = False)
|
|
|
375 |
gr.update(interactive=True, value=""),
|
376 |
gr.update(visible=False,label = guidance_scale_label),
|
377 |
gr.update(interactive=True, value =False),
|
378 |
+
gr.update(value=DEFAULT_WARMUP_STEPS),
|
379 |
+
gr.update(value=DEFAULT_THRESHOLD),
|
380 |
gr.update(visible=True),
|
381 |
enable_interactive,
|
382 |
row1_visibility,
|
|
|
387 |
)
|
388 |
|
389 |
|
390 |
+
|
391 |
def update_display_concept(button_label, edit_concept, neg_guidance, sega_concepts_counter):
|
392 |
sega_concepts_counter += 1
|
393 |
guidance_scale_label = "Concept Guidance Scale"
|
|
|
661 |
|
662 |
remove_concept1.click(
|
663 |
fn=update_counter,inputs=[sega_concepts_counter,edit_concept_1,edit_concept_2,edit_concept_3], outputs=sega_concepts_counter).then(
|
664 |
+
fn = remove_concept, inputs=[sega_concepts_counter,gr.State(1)], outputs= [box1, concept_1, edit_concept_1, guidnace_scale_1,neg_guidance_1,warmup_1, threshold_1, add_1, dropdown1, row1, row2, row3, row4, sega_concepts_counter],queue=False)
|
665 |
remove_concept2.click(
|
666 |
fn=update_counter,inputs=[sega_concepts_counter,edit_concept_1,edit_concept_2,edit_concept_3], outputs=sega_concepts_counter).then(
|
667 |
+
fn = remove_concept, inputs=[sega_concepts_counter,gr.State(2)], outputs=[box2, concept_2, edit_concept_2, guidnace_scale_2,neg_guidance_2, warmup_2, threshold_2, add_2 , dropdown2, row1, row2, row3, row4, sega_concepts_counter],queue=False)
|
668 |
remove_concept3.click(
|
669 |
fn=update_counter,inputs=[sega_concepts_counter,edit_concept_1,edit_concept_2,edit_concept_3], outputs=sega_concepts_counter).then(
|
670 |
+
fn = remove_concept,inputs=[sega_concepts_counter,gr.State(3)], outputs=[box3, concept_3, edit_concept_3, guidnace_scale_3,neg_guidance_3,warmup_3, threshold_3, add_3, dropdown3, row1, row2, row3, row4, sega_concepts_counter],queue=False)
|
671 |
|
672 |
#add_concept_button.click(fn = update_display_concept, inputs=sega_concepts_counter,
|
673 |
# outputs= [row2, row2_advanced, row3, row3_advanced, add_concept_button, sega_concepts_counter], queue = False)
|