macgaga commited on
Commit
1d77b56
·
verified ·
1 Parent(s): 3a9eb7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -11
app.py CHANGED
@@ -841,17 +841,38 @@ with gr.Blocks(theme='NoCrypt/miku@>=1.2.2', fill_width=True, css=css, delete_ca
841
  lora_scale_2 = gr.Slider(label="LoRA 2 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
842
  with gr.Row():
843
  remove_button_2 = gr.Button("Remove", size="sm")
844
- with gr.Row():
845
- with gr.Column():
846
- selected_info = gr.Markdown("")
847
- gallery = gr.Gallery([(item["image"], item["title"]) for item in loras], label="LoRA Gallery", allow_preview=False,
848
- columns=4, elem_id="gallery", show_share_button=False, interactive=False)
849
- with gr.Group():
850
- with gr.Row(elem_id="custom_lora_structure"):
851
- custom_lora = gr.Textbox(label="Custom LoRA", info="LoRA Hugging Face path or *.safetensors public URL", placeholder="multimodalart/vintage-ads-flux", scale=3, min_width=150)
852
- add_custom_lora_button = gr.Button("Add Custom LoRA", elem_id="custom_lora_btn", scale=2, min_width=150)
853
- remove_custom_lora_button = gr.Button("Remove Custom LoRA", visible=False)
854
- 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")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
855
  with gr.Column():
856
  progress_bar = gr.Markdown(elem_id="progress",visible=False)
857
  result = gr.Image(label="Generated Image", format="png", type="filepath", show_share_button=False, interactive=False)
 
841
  lora_scale_2 = gr.Slider(label="LoRA 2 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
842
  with gr.Row():
843
  remove_button_2 = gr.Button("Remove", size="sm")
844
+ with gr.Row():
845
+ with gr.Column():
846
+ selected_info = gr.Markdown("")
847
+ # Die Galerie wird angepasst:
848
+ gallery = gr.Gallery(
849
+ [(item["image"], item["title"]) for item in loras],
850
+ label="LoRA Gallery",
851
+ allow_preview=False,
852
+ columns=4, # Setzt die Anzahl der Spalten auf 4
853
+ rows=1, # Begrenzt die Galerie auf eine Zeile
854
+ elem_id="gallery",
855
+ show_share_button=False,
856
+ interactive=False
857
+ )
858
+ with gr.Group():
859
+ with gr.Row(elem_id="custom_lora_structure"):
860
+ custom_lora = gr.Textbox(
861
+ label="Custom LoRA",
862
+ info="LoRA Hugging Face path or *.safetensors public URL",
863
+ placeholder="multimodalart/vintage-ads-flux",
864
+ scale=3,
865
+ min_width=150
866
+ )
867
+ add_custom_lora_button = gr.Button(
868
+ "Add Custom LoRA", elem_id="custom_lora_btn", scale=2, min_width=150
869
+ )
870
+ remove_custom_lora_button = gr.Button("Remove Custom LoRA", visible=False)
871
+ gr.Markdown(
872
+ "[Check the list of FLUX LoRAs](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.1-dev)",
873
+ elem_id="lora_list"
874
+ )
875
+
876
  with gr.Column():
877
  progress_bar = gr.Markdown(elem_id="progress",visible=False)
878
  result = gr.Image(label="Generated Image", format="png", type="filepath", show_share_button=False, interactive=False)