harpomaxx commited on
Commit
23cd40c
·
verified ·
1 Parent(s): 3949e15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -106,9 +106,21 @@ with gr.Blocks() as demo:
106
 
107
  btn = gr.Button("Generate image").style(full_width=False)
108
 
109
- gallery = gr.Gallery(
110
- label="Generated images", show_label=False, elem_id="gallery"
111
- ).style(columns=[1], rows=[1], object_fit="scale-down", height="50%", width="50%")
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  num_images_slider = 1
114
  num_inference_steps_slider = 20
 
106
 
107
  btn = gr.Button("Generate image").style(full_width=False)
108
 
109
+ #gallery = gr.Gallery(
110
+ # label="Generated images", show_label=False, elem_id="gallery"
111
+ #).style(columns=[1], rows=[1], object_fit="scale-down", height="50%", width="50%")
112
+
113
+
114
+ gallery = gr.Image(
115
+ label="Generated image",
116
+ show_label = False,
117
+ tool=None, # Disable editing tools if not needed
118
+ source="upload") # Allows image uploading
119
+ .style(
120
+ width="50%", # Use the full view width
121
+ height="50%", # Use the full view height
122
+ object_fit="scale-down" # Maintain aspect ratio without cropping
123
+ )
124
 
125
  num_images_slider = 1
126
  num_inference_steps_slider = 20