Sebastiankay commited on
Commit
a42a9d1
1 Parent(s): 9da86fc

Sep 10, 2024, 5:22 PM

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -170,7 +170,7 @@ with gr.Blocks(theme=theme, head=custom_head, css=custom_css, js=custom_js, titl
170
  with gr.Column(scale=2): # min_width=420,
171
  with gr.Row():
172
  placeholder_text = "[???] Generiert dir einen zufälligen Prompt.\n[STERN] optimiert deinen eignen Prompt.\n[RUN] generiert dein Bild."
173
- text_prompt = gr.Textbox(label="Prompt", show_label=False, lines=12, max_lines=18, placeholder=placeholder_text, elem_id="prompt_input", elem_classes="prompt-input", autofocus=True)
174
  with gr.Row():
175
  random_prompt_button = gr.Button("", variant="secondary", elem_id="random_prompt_btn", elem_classes="random-prompt-btn", icon="_res/assets/star_light_48.png")
176
  enhance_prompt_button = gr.Button("", variant="secondary", elem_id="enhance_prompt_btn", elem_classes="enhance-prompt-btn", icon="_res/assets/star_light_48.png")
@@ -184,7 +184,7 @@ with gr.Blocks(theme=theme, head=custom_head, css=custom_css, js=custom_js, titl
184
  image_ratio_buttons = gr.Radio(["16:9", "4:3", "3:2", "1:1"], value="3:2", label="Querformat", show_label=True, info="Die gängigsten Seitenverhältnissen.", interactive=True, elem_id="image_ratio_buttons", elem_classes="image-ratio-buttons", container=True, scale=2)
185
  switch_width_height = gr.Button("", size="sm", elem_id="switch_width_height", elem_classes="switch-ratio-btn", variant="primary", scale=1)
186
  with gr.Column():
187
- image_seed = gr.Slider(label="Seed", info="Jeder Seed generiert ein anderes Bild mit dem selben Prompt", minimum=0, step=1, value=42, maximum=MAX_SEED)
188
  randomize_seed = gr.Checkbox(label="Randomize seed", value=False)
189
 
190
  with gr.Column(scale=4): # min_width=600,
@@ -208,8 +208,8 @@ with gr.Blocks(theme=theme, head=custom_head, css=custom_css, js=custom_js, titl
208
  output_url = gr.Textbox(label="Output URL", show_label=True, interactive=False, visible=False)
209
  outpu_image_comment = gr.Json(visible=False)
210
  output_dominant_image_color = gr.Textbox(show_label=False, elem_id="dominant_image_color", visible=True, elem_classes="output-dominant-image-color")
211
- image_info_tb_prompt = gr.Textbox("Bild Prompt", lines=4, max_lines=8, interactive=False, show_copy_button=True, visible=True)
212
- random_promp_output = gr.Textbox(show_label=False, elem_id="random_promp_output", elem_classes="random_promp_output", visible=True, interactive=False)
213
 
214
  def switch_image_size_values(image_width, image_height):
215
  return image_height, image_width
 
170
  with gr.Column(scale=2): # min_width=420,
171
  with gr.Row():
172
  placeholder_text = "[???] Generiert dir einen zufälligen Prompt.\n[STERN] optimiert deinen eignen Prompt.\n[RUN] generiert dein Bild."
173
+ text_prompt = gr.Textbox(label="Prompt", show_label=False, lines=12, max_lines=18, placeholder=placeholder_text, elem_id="prompt_input", elem_classes="prompt-input hide-progress", autofocus=True)
174
  with gr.Row():
175
  random_prompt_button = gr.Button("", variant="secondary", elem_id="random_prompt_btn", elem_classes="random-prompt-btn", icon="_res/assets/star_light_48.png")
176
  enhance_prompt_button = gr.Button("", variant="secondary", elem_id="enhance_prompt_btn", elem_classes="enhance-prompt-btn", icon="_res/assets/star_light_48.png")
 
184
  image_ratio_buttons = gr.Radio(["16:9", "4:3", "3:2", "1:1"], value="3:2", label="Querformat", show_label=True, info="Die gängigsten Seitenverhältnissen.", interactive=True, elem_id="image_ratio_buttons", elem_classes="image-ratio-buttons", container=True, scale=2)
185
  switch_width_height = gr.Button("", size="sm", elem_id="switch_width_height", elem_classes="switch-ratio-btn", variant="primary", scale=1)
186
  with gr.Column():
187
+ image_seed = gr.Slider(label="Seed", info="Jeder Seed generiert ein anderes Bild mit dem selben Prompt", minimum=0, step=1, value=42, maximum=MAX_SEED, elem_id="image_seed", elem_classes="image-seed hide-progress")
188
  randomize_seed = gr.Checkbox(label="Randomize seed", value=False)
189
 
190
  with gr.Column(scale=4): # min_width=600,
 
208
  output_url = gr.Textbox(label="Output URL", show_label=True, interactive=False, visible=False)
209
  outpu_image_comment = gr.Json(visible=False)
210
  output_dominant_image_color = gr.Textbox(show_label=False, elem_id="dominant_image_color", visible=True, elem_classes="output-dominant-image-color")
211
+ image_info_tb_prompt = gr.Textbox("Bild Prompt", lines=4, max_lines=8, interactive=False, elem_classes="hide-progress", show_copy_button=True, visible=True)
212
+ random_promp_output = gr.Textbox(show_label=False, elem_id="random_promp_output", elem_classes="random_promp_output hide-progress", visible=True, interactive=False)
213
 
214
  def switch_image_size_values(image_width, image_height):
215
  return image_height, image_width