ysharma HF Staff commited on
Commit
0acc8e1
·
verified ·
1 Parent(s): 9b4ae6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -22
app.py CHANGED
@@ -147,26 +147,9 @@ def process_images(annotated_image, second_image, user_api_key=None, progress=gr
147
  else:
148
  os.environ.pop("FAL_KEY", None)
149
 
150
- # CSS for better styling
151
- css = """
152
- .container {
153
- max-width: 1200px;
154
- margin: auto;
155
- }
156
- .title {
157
- text-align: center;
158
- margin-bottom: 1rem;
159
- }
160
- .api-key-box {
161
- background-color: #f8f9fa;
162
- border-left: 4px solid #007bff;
163
- padding: 10px;
164
- margin: 10px 0;
165
- }
166
- """
167
 
168
  # Create the Gradio interface
169
- with gr.Blocks(css=css, theme="ocean") as demo:
170
  gr.HTML(
171
  """
172
  <h1><center>🎨 Grounded Nano Banana App</center></h1>
@@ -210,14 +193,17 @@ with gr.Blocks(css=css, theme="ocean") as demo:
210
  first_image = image_annotator(
211
  #value=None,
212
  label="Draw a box where you want to place the object",
213
- image_type="numpy",
214
  single_box=True, # Only allow one box
215
- disable_edit_boxes=True, # Simplify the interface
 
 
216
  box_thickness=3,
217
  box_selected_thickness=4,
218
- height=400,
219
  show_label=True,
220
- box_min_size=20,
 
221
  )
222
 
223
  with gr.Column(scale=1):
 
147
  else:
148
  os.environ.pop("FAL_KEY", None)
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
 
151
  # Create the Gradio interface
152
+ with gr.Blocks(theme="ocean") as demo:
153
  gr.HTML(
154
  """
155
  <h1><center>🎨 Grounded Nano Banana App</center></h1>
 
193
  first_image = image_annotator(
194
  #value=None,
195
  label="Draw a box where you want to place the object",
196
+ #image_type="numpy",
197
  single_box=True, # Only allow one box
198
+ disable_edit_boxes=False,
199
+ show_download_button=False,
200
+ show_share_button=False,
201
  box_thickness=3,
202
  box_selected_thickness=4,
203
+ #height=400,
204
  show_label=True,
205
+ image_mode="RGB",
206
+ #box_min_size=20,
207
  )
208
 
209
  with gr.Column(scale=1):