Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -484,7 +484,9 @@ def main_ui():
|
|
| 484 |
show_download_button=True,
|
| 485 |
type="pil"
|
| 486 |
)
|
| 487 |
-
|
|
|
|
|
|
|
| 488 |
# TEXT INTEGRATION FÜR BILD-zu-BILD
|
| 489 |
text_input_i2i, text_x_i2i, text_y_i2i, target_selector, text_btn_i2i = create_text_integration_section_i2i()
|
| 490 |
|
|
@@ -509,9 +511,18 @@ def main_ui():
|
|
| 509 |
inputs=coordinate_inputs,
|
| 510 |
outputs=preview_output
|
| 511 |
)
|
| 512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 513 |
preview_output.select(
|
| 514 |
-
fn=
|
| 515 |
outputs=[text_x_i2i, text_y_i2i]
|
| 516 |
)
|
| 517 |
|
|
|
|
| 484 |
show_download_button=True,
|
| 485 |
type="pil"
|
| 486 |
)
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
|
| 490 |
# TEXT INTEGRATION FÜR BILD-zu-BILD
|
| 491 |
text_input_i2i, text_x_i2i, text_y_i2i, target_selector, text_btn_i2i = create_text_integration_section_i2i()
|
| 492 |
|
|
|
|
| 511 |
inputs=coordinate_inputs,
|
| 512 |
outputs=preview_output
|
| 513 |
)
|
| 514 |
+
|
| 515 |
+
|
| 516 |
+
# MIT DIESEM DEBUG-CODE:
|
| 517 |
+
def debug_click(img, evt: gr.SelectData):
|
| 518 |
+
print(f"🎯 CLICK ERKANNT: {evt}")
|
| 519 |
+
if evt:
|
| 520 |
+
print(f"🎯 INDEX: {evt.index}")
|
| 521 |
+
return evt.index[0], evt.index[1]
|
| 522 |
+
return 100, 100
|
| 523 |
+
|
| 524 |
preview_output.select(
|
| 525 |
+
fn=debug_click,
|
| 526 |
outputs=[text_x_i2i, text_y_i2i]
|
| 527 |
)
|
| 528 |
|