Spaces:
Runtime error
Runtime error
pass in separated_text to grounding_instruction
Browse filesgrounding_instruction then becomes grounding_text in future draw functions to break up the subjects
app.py
CHANGED
@@ -579,18 +579,13 @@ with Blocks(
|
|
579 |
btn = gr.Button("Gen")
|
580 |
with gr.Column():
|
581 |
separated_text = gr.Text(label="Subjects Separated by Semicolon")
|
|
|
582 |
language_instruction = gr.Textbox(
|
583 |
label="Language Instruction by User",
|
584 |
value=seed,
|
585 |
visible=False
|
586 |
)
|
587 |
-
grounding_instruction
|
588 |
-
label="Subjects in image (Separated by semicolon)",
|
589 |
-
value=separated_text,
|
590 |
-
visible=False
|
591 |
-
)
|
592 |
-
btn.click(separate_subjects, inputs=[seed], outputs=[separated_text, language_instruction, grounding_instruction])
|
593 |
-
|
594 |
# language_instruction.value = seed
|
595 |
# grounding_instruction.value = separated_text
|
596 |
|
@@ -748,6 +743,14 @@ with Blocks(
|
|
748 |
outputs=[out_gen_1, out_gen_2, out_gen_3, out_gen_4, state],
|
749 |
queue=True
|
750 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
751 |
sketch_pad_resize_trigger.change(
|
752 |
None,
|
753 |
None,
|
|
|
579 |
btn = gr.Button("Gen")
|
580 |
with gr.Column():
|
581 |
separated_text = gr.Text(label="Subjects Separated by Semicolon")
|
582 |
+
btn.click(separate_subjects, inputs=[seed], outputs=[separated_text, language_instruction, grounding_instruction])
|
583 |
language_instruction = gr.Textbox(
|
584 |
label="Language Instruction by User",
|
585 |
value=seed,
|
586 |
visible=False
|
587 |
)
|
588 |
+
grounding_instruction=separated_text
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
# language_instruction.value = seed
|
590 |
# grounding_instruction.value = separated_text
|
591 |
|
|
|
743 |
outputs=[out_gen_1, out_gen_2, out_gen_3, out_gen_4, state],
|
744 |
queue=True
|
745 |
)
|
746 |
+
# start_btn.click(
|
747 |
+
# update_grounding_instruction,
|
748 |
+
# # inputs=[
|
749 |
+
# # original_input,
|
750 |
+
# # ],
|
751 |
+
# # outputs=[separated_subjects],
|
752 |
+
# # queue=True
|
753 |
+
# )
|
754 |
sketch_pad_resize_trigger.change(
|
755 |
None,
|
756 |
None,
|