Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -887,32 +887,9 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
887 |
fn=lambda pos=pos: update_position(pos), # ํด๋ก์ ๋ฌธ์ ํด๊ฒฐ์ ์ํด ์์
|
888 |
outputs=position
|
889 |
)
|
890 |
-
|
891 |
-
add_text_btn.click(
|
892 |
-
fn=add_text_to_image,
|
893 |
-
inputs=[
|
894 |
-
combined_image,
|
895 |
-
text_input,
|
896 |
-
font_size,
|
897 |
-
color_dropdown,
|
898 |
-
opacity_slider,
|
899 |
-
x_position,
|
900 |
-
y_position,
|
901 |
-
thickness,
|
902 |
-
text_position_type,
|
903 |
-
font_choice
|
904 |
-
],
|
905 |
-
outputs=combined_image,
|
906 |
-
show_progress=True
|
907 |
-
).then(
|
908 |
-
lambda: None, # ์ถ๊ฐ ์์
์ด ํ์ํ ๊ฒฝ์ฐ ์ฌ๊ธฐ์ ํจ์๋ฅผ ๋ฃ์ ์ ์์ต๋๋ค
|
909 |
-
None,
|
910 |
-
None,
|
911 |
-
_js="() => {console.log('Text addition completed');}" # ๋๋ฒ๊น
์ฉ JavaScript
|
912 |
-
)
|
913 |
|
914 |
|
915 |
-
|
916 |
bg_prompt.change(
|
917 |
fn=update_controls,
|
918 |
inputs=bg_prompt,
|
@@ -948,6 +925,24 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
948 |
queue=True
|
949 |
)
|
950 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
951 |
demo.queue(max_size=5)
|
952 |
demo.launch(
|
953 |
server_name="0.0.0.0",
|
|
|
887 |
fn=lambda pos=pos: update_position(pos), # ํด๋ก์ ๋ฌธ์ ํด๊ฒฐ์ ์ํด ์์
|
888 |
outputs=position
|
889 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
890 |
|
891 |
|
892 |
+
# ์ด๋ฒคํธ ๋ฐ์ธ๋ฉ
|
893 |
bg_prompt.change(
|
894 |
fn=update_controls,
|
895 |
inputs=bg_prompt,
|
|
|
925 |
queue=True
|
926 |
)
|
927 |
|
928 |
+
add_text_btn.click(
|
929 |
+
fn=add_text_to_image,
|
930 |
+
inputs=[
|
931 |
+
combined_image,
|
932 |
+
text_input,
|
933 |
+
font_size,
|
934 |
+
color_dropdown,
|
935 |
+
opacity_slider,
|
936 |
+
x_position,
|
937 |
+
y_position,
|
938 |
+
thickness,
|
939 |
+
text_position_type,
|
940 |
+
font_choice
|
941 |
+
],
|
942 |
+
outputs=combined_image,
|
943 |
+
show_progress=True
|
944 |
+
)
|
945 |
+
|
946 |
demo.queue(max_size=5)
|
947 |
demo.launch(
|
948 |
server_name="0.0.0.0",
|