yiren98 commited on
Commit
d525ac7
·
1 Parent(s): 17e0575
Files changed (1) hide show
  1. gradio_app.py +8 -15
gradio_app.py CHANGED
@@ -296,29 +296,22 @@ with gr.Blocks() as demo:
296
 
297
  with gr.Column(scale=1):
298
  # Status message box
299
- status_box = gr.Textbox(label="Status", placeholder="Model loading status", interactive=False, value="Model not loaded")
300
 
301
  with gr.Row():
302
- with gr.Column(scale=2):
303
  # Input for the prompt
304
- prompt = gr.Textbox(label="Prompt", placeholder="Enter your prompt here", lines=1)
305
-
306
- with gr.Column(scale=1):
307
- # Seed
308
- seed = gr.Slider(0, np.iinfo(np.int32).max, step=1, label="Seed", value=0)
309
-
310
- with gr.Row():
311
- with gr.Column(scale=2):
312
  # File upload for image
313
  sample_image = gr.Image(label="Upload a Conditional Image", type="pil")
314
-
315
- with gr.Column(scale=1):
316
- # Run Button
317
  run_button = gr.Button("Generate Image")
318
-
319
  with gr.Column(scale=1):
320
  # Output result
321
- result_image = gr.Image(label="Generated Image")
322
 
323
  # Load model button action
324
  load_button.click(fn=load_target_model, inputs=[recraft_model], outputs=[status_box])
 
296
 
297
  with gr.Column(scale=1):
298
  # Status message box
299
+ status_box = gr.Textbox(label="Status", placeholder="Model loading status", interactive=False, value="Model not loaded", lines=3)
300
 
301
  with gr.Row():
302
+ with gr.Column(scale=0.5):
303
  # Input for the prompt
304
+ prompt = gr.Textbox(label="Prompt", placeholder="Enter your prompt here", lines=8)
305
+ seed = gr.Slider(0, np.iinfo(np.int32).max, step=1, label="Seed", value=42)
306
+
307
+ with gr.Column(scale=0.5):
 
 
 
 
308
  # File upload for image
309
  sample_image = gr.Image(label="Upload a Conditional Image", type="pil")
 
 
 
310
  run_button = gr.Button("Generate Image")
311
+
312
  with gr.Column(scale=1):
313
  # Output result
314
+ result_image = gr.Image(label="Generated Image", interactive=False)
315
 
316
  # Load model button action
317
  load_button.click(fn=load_target_model, inputs=[recraft_model], outputs=[status_box])