aiqtech commited on
Commit
9eba18d
ยท
verified ยท
1 Parent(s): 27c0752

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -24
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",