aiqtech commited on
Commit
a4207e3
·
verified ·
1 Parent(s): 92d4ae1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -22
app.py CHANGED
@@ -919,6 +919,22 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
919
  )
920
 
921
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
922
  add_text_btn.click(
923
  fn=add_text_to_image,
924
  inputs=[
@@ -938,6 +954,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
938
  show_progress=True
939
  )
940
 
 
 
941
  # 추가: 결과 이미지 업데이트를 위한 이벤트
942
  combined_image.change(
943
  fn=lambda x: x,
@@ -969,28 +987,9 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
969
  )
970
 
971
 
972
- process_btn.click(
973
- fn=process_prompt,
974
- inputs=[
975
- input_image,
976
- text_prompt,
977
- bg_prompt,
978
- aspect_ratio,
979
- position,
980
- scale_slider
981
- ],
982
- outputs=[combined_image, extracted_image],
983
- queue=True,
984
- show_progress=True
985
- ).success(
986
- fn=None,
987
- _js="""
988
- function() {
989
- document.querySelector('.output-panel').scrollIntoView({behavior: 'smooth'});
990
- }
991
- """
992
- )
993
 
 
 
994
  demo.queue(max_size=10, concurrency_count=2)
995
  demo.launch(
996
  server_name="0.0.0.0",
@@ -1000,4 +999,3 @@ demo.launch(
1000
  show_error=True,
1001
  prevent_thread_lock=True
1002
  )
1003
-
 
919
  )
920
 
921
 
922
+ # 이벤트 바인딩 수정
923
+ process_btn.click(
924
+ fn=process_prompt,
925
+ inputs=[
926
+ input_image,
927
+ text_prompt,
928
+ bg_prompt,
929
+ aspect_ratio,
930
+ position,
931
+ scale_slider
932
+ ],
933
+ outputs=[combined_image, extracted_image],
934
+ queue=True,
935
+ show_progress=True
936
+ )
937
+
938
  add_text_btn.click(
939
  fn=add_text_to_image,
940
  inputs=[
 
954
  show_progress=True
955
  )
956
 
957
+
958
+
959
  # 추가: 결과 이미지 업데이트를 위한 이벤트
960
  combined_image.change(
961
  fn=lambda x: x,
 
987
  )
988
 
989
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
990
 
991
+
992
+ # demo 설정 수정
993
  demo.queue(max_size=10, concurrency_count=2)
994
  demo.launch(
995
  server_name="0.0.0.0",
 
999
  show_error=True,
1000
  prevent_thread_lock=True
1001
  )