openfree commited on
Commit
7a73a44
1 Parent(s): 8e85354

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -2
app.py CHANGED
@@ -765,7 +765,28 @@ input:focus, textarea:focus {
765
  width: 90% !important;
766
  margin: 0 auto !important;
767
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
768
  '''
 
769
  with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
770
  loras_state = gr.State(loras)
771
  selected_indices = gr.State([])
@@ -844,13 +865,14 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
844
  remove_button_3 = gr.Button("Remove", size="sm")
845
 
846
  # Result and Progress Area
847
- with gr.Column():
848
  progress_bar = gr.Markdown(elem_id="progress", visible=False)
849
  result = gr.Image(
850
  label="Generated Image",
851
  interactive=False,
852
  elem_classes=["generated-image"],
853
- container=True
 
854
  )
855
  with gr.Accordion("History", open=False):
856
  history_gallery = gr.Gallery(
@@ -861,6 +883,8 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
861
  elem_classes=["history-gallery"]
862
  )
863
 
 
 
864
  # Advanced Settings
865
  with gr.Row():
866
  with gr.Accordion("Advanced Settings", open=False):
 
765
  width: 90% !important;
766
  margin: 0 auto !important;
767
  }
768
+
769
+ #result_column {
770
+ display: flex;
771
+ flex-direction: column;
772
+ align-items: center; /* 가운데 정렬 */
773
+ /* align-items: flex-start; /* 좌측 정렬을 원할 경우 이 줄을 사용 */
774
+ width: 100%;
775
+ }
776
+
777
+ #result_image {
778
+ max-width: 768px; /* 이미지 최대 너비 설정 */
779
+ margin: 0 auto; /* 가운데 정렬을 위한 마진 */
780
+ }
781
+
782
+ .generated-image {
783
+ display: flex;
784
+ justify-content: center; /* 가운데 정렬 */
785
+ /* justify-content: flex-start; /* 좌측 정렬을 원할 경우 이 줄을 사용 */
786
+ width: 100%;
787
+ }
788
  '''
789
+
790
  with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
791
  loras_state = gr.State(loras)
792
  selected_indices = gr.State([])
 
865
  remove_button_3 = gr.Button("Remove", size="sm")
866
 
867
  # Result and Progress Area
868
+ with gr.Column(elem_id="result_column"): # elem_id 추가
869
  progress_bar = gr.Markdown(elem_id="progress", visible=False)
870
  result = gr.Image(
871
  label="Generated Image",
872
  interactive=False,
873
  elem_classes=["generated-image"],
874
+ container=True,
875
+ elem_id="result_image" # elem_id 추가
876
  )
877
  with gr.Accordion("History", open=False):
878
  history_gallery = gr.Gallery(
 
883
  elem_classes=["history-gallery"]
884
  )
885
 
886
+
887
+
888
  # Advanced Settings
889
  with gr.Row():
890
  with gr.Accordion("Advanced Settings", open=False):