DamarJati commited on
Commit
202b8a5
·
verified ·
1 Parent(s): 700d979

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -50,8 +50,8 @@ with gr.Blocks(css= "style.css") as app:
50
  with gr.Tab("Text-to-Image"):
51
  with gr.Row():
52
  with gr.Column(scale=1):
53
- prompt_input = gr.Textbox(label="Prompt", placeholder="Masukkan prompt teks", lines=2, elem_id="prompt-input")
54
- neg_prompt_input = gr.Textbox(label="Neg Prompt", placeholder="Masukkan negasi prompt", lines=2, elem_id="neg-prompt-input")
55
  generate_button = gr.Button("Generate", elem_id="generate-button", scale=0.13)
56
 
57
  with gr.Row():
@@ -61,11 +61,11 @@ with gr.Blocks(css= "style.css") as app:
61
  seed_input = gr.Number(label="Seed", value=-1)
62
 
63
  with gr.Row():
64
- width_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Width", value=512)
65
  batch_size = gr.Slider(minimum=1, maximum=24, step=1, label="Batch size", value=1)
66
 
67
  with gr.Row():
68
- height_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Height", value=512)
69
  batch_count = gr.Slider(minimum=1, maximum=24, step=1, label="Batch Count", value=1)
70
 
71
  with gr.Row():
@@ -84,9 +84,9 @@ with gr.Blocks(css= "style.css") as app:
84
 
85
  with gr.Column():
86
  # Gallery untuk output gambar
87
- output_gallery = gr.Gallery(label="Hasil Gambar")
88
  # Output teks JSON di bawah gallery
89
- output_text = gr.Textbox(label="Output JSON", placeholder="Hasil dalam format JSON", lines=2)
90
 
91
  def update_images(prompt, neg_prompt, width, height, scheduler, num_steps, num_images, cfg_scale, seed, model):
92
  # Update fungsi sesuai kebutuhan
 
50
  with gr.Tab("Text-to-Image"):
51
  with gr.Row():
52
  with gr.Column(scale=1):
53
+ prompt_input = gr.Textbox(label="Prompt", placeholder="Enter Prompt", lines=2, elem_id="prompt-input")
54
+ neg_prompt_input = gr.Textbox(label="Negative prompt", placeholder="Enter Negative Prompt (optional)", lines=2, elem_id="neg-prompt-input")
55
  generate_button = gr.Button("Generate", elem_id="generate-button", scale=0.13)
56
 
57
  with gr.Row():
 
61
  seed_input = gr.Number(label="Seed", value=-1)
62
 
63
  with gr.Row():
64
+ width_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Width", value=1024)
65
  batch_size = gr.Slider(minimum=1, maximum=24, step=1, label="Batch size", value=1)
66
 
67
  with gr.Row():
68
+ height_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Height", value=1024)
69
  batch_count = gr.Slider(minimum=1, maximum=24, step=1, label="Batch Count", value=1)
70
 
71
  with gr.Row():
 
84
 
85
  with gr.Column():
86
  # Gallery untuk output gambar
87
+ output_gallery = gr.Gallery(label="Image Results")
88
  # Output teks JSON di bawah gallery
89
+ output_text = gr.Textbox(label="Metadata", placeholder="Results are in Json format", lines=2)
90
 
91
  def update_images(prompt, neg_prompt, width, height, scheduler, num_steps, num_images, cfg_scale, seed, model):
92
  # Update fungsi sesuai kebutuhan