openfree commited on
Commit
5284b90
·
verified ·
1 Parent(s): ba2def0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +52 -9
app.py CHANGED
@@ -715,6 +715,33 @@ input:focus, textarea:focus {
715
  width: 100% !important;
716
  max-width: 100% !important;
717
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
718
  '''
719
 
720
 
@@ -744,8 +771,6 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
744
  container=True,
745
  preview=False
746
  )
747
-
748
-
749
 
750
 
751
  with gr.Tab(label="Generate"):
@@ -798,12 +823,24 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
798
  with gr.Row():
799
  remove_button_3 = gr.Button("Remove", size="sm")
800
 
801
- # Result and Progress Area
802
- with gr.Column():
803
- progress_bar = gr.Markdown(elem_id="progress", visible=False)
804
- result = gr.Image(label="Generated Image", interactive=False)
805
- with gr.Accordion("History", open=False):
806
- history_gallery = gr.Gallery(label="History", columns=6, object_fit="contain", interactive=False)
 
 
 
 
 
 
 
 
 
 
 
 
807
 
808
  # Advanced Settings
809
  with gr.Row():
@@ -830,7 +867,13 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
830
  add_custom_lora_button = gr.Button("Add Custom LoRA", elem_id="custom_lora_btn", scale=2, min_width=150)
831
  remove_custom_lora_button = gr.Button("Remove Custom LoRA", visible=False)
832
  gr.Markdown("[Check the list of FLUX LoRAs](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.1-dev)", elem_id="lora_list")
833
-
 
 
 
 
 
 
834
 
835
  # Event Handlers
836
  gallery.select(
 
715
  width: 100% !important;
716
  max-width: 100% !important;
717
  }
718
+
719
+ /* 생성된 이미지 결과 박스 크기 조정 (10% 축소) */
720
+ .generated-image {
721
+ width: 90% !important; /* 100%에서 90%로 축소 */
722
+ max-width: 90% !important;
723
+ margin: 0 auto !important; /* 중앙 정렬을 위해 */
724
+ }
725
+
726
+ /* 결과 이미지 컨테이너 크기 조정 */
727
+ .result-container {
728
+ width: 90% !important;
729
+ max-width: 90% !important;
730
+ margin: 0 auto !important;
731
+ }
732
+
733
+ /* Progress bar 크기 조정 */
734
+ #progress {
735
+ width: 90% !important;
736
+ margin: 0 auto !important;
737
+ }
738
+
739
+ /* History gallery 크기 조정 */
740
+ .history-gallery {
741
+ width: 90% !important;
742
+ max-width: 90% !important;
743
+ margin: 0 auto !important;
744
+ }
745
  '''
746
 
747
 
 
771
  container=True,
772
  preview=False
773
  )
 
 
774
 
775
 
776
  with gr.Tab(label="Generate"):
 
823
  with gr.Row():
824
  remove_button_3 = gr.Button("Remove", size="sm")
825
 
826
+ # Result and Progress Area
827
+ with gr.Column(scale=0.9): # 10% 축소를 위해 scale 값을 0.9로 설정
828
+ progress_bar = gr.Markdown(elem_id="progress", visible=False)
829
+ result = gr.Image(
830
+ label="Generated Image",
831
+ interactive=False,
832
+ elem_classes=["generated-image", "result-container"],
833
+ scale=0.9 # 이미지 크기도 10% 축소
834
+ )
835
+ with gr.Accordion("History", open=False):
836
+ history_gallery = gr.Gallery(
837
+ label="History",
838
+ columns=6,
839
+ object_fit="contain",
840
+ interactive=False,
841
+ elem_classes=["history-gallery"],
842
+ scale=0.9 # 히스토리 갤러리도 10% 축소
843
+ )
844
 
845
  # Advanced Settings
846
  with gr.Row():
 
867
  add_custom_lora_button = gr.Button("Add Custom LoRA", elem_id="custom_lora_btn", scale=2, min_width=150)
868
  remove_custom_lora_button = gr.Button("Remove Custom LoRA", visible=False)
869
  gr.Markdown("[Check the list of FLUX LoRAs](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.1-dev)", elem_id="lora_list")
870
+
871
+ # Result and Progress Area
872
+ with gr.Column():
873
+ progress_bar = gr.Markdown(elem_id="progress", visible=False)
874
+ result = gr.Image(label="Generated Image", interactive=False)
875
+ with gr.Accordion("History", open=False):
876
+ history_gallery = gr.Gallery(label="History", columns=6, object_fit="contain", interactive=False)
877
 
878
  # Event Handlers
879
  gallery.select(