Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -38,6 +38,14 @@ from transformers import pipeline
|
|
38 |
from controlnet_union import ControlNetModel_Union
|
39 |
from pipeline_fill_sd_xl import StableDiffusionXLFillPipeline
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
def debug_event(event_name, *args):
|
42 |
"""이벤트 디버깅 유틸리티"""
|
43 |
print(f"Event '{event_name}' triggered at {time.strftime('%H:%M:%S')}")
|
@@ -1250,8 +1258,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
1250 |
queue=False
|
1251 |
)
|
1252 |
|
1253 |
-
|
1254 |
-
|
1255 |
add_text_btn.click(
|
1256 |
fn=add_text_to_image,
|
1257 |
inputs=[
|
@@ -1266,10 +1272,12 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
1266 |
text_position_type,
|
1267 |
font_choice
|
1268 |
],
|
1269 |
-
outputs=combined_image,
|
1270 |
-
|
|
|
1271 |
)
|
1272 |
|
|
|
1273 |
demo.queue(max_size=5)
|
1274 |
demo.launch(
|
1275 |
server_name="0.0.0.0",
|
|
|
38 |
from controlnet_union import ControlNetModel_Union
|
39 |
from pipeline_fill_sd_xl import StableDiffusionXLFillPipeline
|
40 |
|
41 |
+
def initialize_ui():
|
42 |
+
"""UI 초기화 함수"""
|
43 |
+
return {
|
44 |
+
"position": "bottom-center",
|
45 |
+
"processing_status": "idle",
|
46 |
+
"status_message": gr.update(visible=False)
|
47 |
+
}
|
48 |
+
|
49 |
def debug_event(event_name, *args):
|
50 |
"""이벤트 디버깅 유틸리티"""
|
51 |
print(f"Event '{event_name}' triggered at {time.strftime('%H:%M:%S')}")
|
|
|
1258 |
queue=False
|
1259 |
)
|
1260 |
|
|
|
|
|
1261 |
add_text_btn.click(
|
1262 |
fn=add_text_to_image,
|
1263 |
inputs=[
|
|
|
1272 |
text_position_type,
|
1273 |
font_choice
|
1274 |
],
|
1275 |
+
outputs=[combined_image, status_message]
|
1276 |
+
).then(
|
1277 |
+
fn=lambda: update_status_message("Text added successfully!")
|
1278 |
)
|
1279 |
|
1280 |
+
|
1281 |
demo.queue(max_size=5)
|
1282 |
demo.launch(
|
1283 |
server_name="0.0.0.0",
|