Update src/app.py
Browse files- src/app.py +6 -7
src/app.py
CHANGED
@@ -148,10 +148,10 @@ def process_images(annotated_image, second_image, user_api_key=None, progress=gr
|
|
148 |
|
149 |
|
150 |
# Create the Gradio interface
|
151 |
-
with gr.Blocks() as demo:
|
152 |
gr.HTML(
|
153 |
"""
|
154 |
-
<h1><center
|
155 |
|
156 |
<b>How to use:</b><br>
|
157 |
1. Upload or capture the first image and draw a box where you want to place an object<br>
|
@@ -192,18 +192,17 @@ with gr.Blocks() as demo:
|
|
192 |
from gradio_image_annotation import image_annotator
|
193 |
#first_image = ImageAnnotator(
|
194 |
first_image = image_annotator(
|
195 |
-
|
196 |
label="Draw a box where you want to place the object",
|
197 |
image_type="pil",
|
198 |
single_box=True, # Only allow one box
|
199 |
-
disable_edit_boxes=
|
200 |
show_download_button=False,
|
201 |
show_share_button=False,
|
202 |
box_thickness=3,
|
203 |
box_selected_thickness=4,
|
204 |
-
#height=400,
|
205 |
show_label=True,
|
206 |
-
image_mode="RGB",
|
207 |
#box_min_size=20,
|
208 |
)
|
209 |
|
@@ -216,7 +215,7 @@ with gr.Blocks() as demo:
|
|
216 |
height=400,
|
217 |
)
|
218 |
# Generate button
|
219 |
-
generate_btn = gr.Button("π Generate Composite Image", variant="primary", size="lg")
|
220 |
|
221 |
# Output section
|
222 |
with gr.Column():
|
|
|
148 |
|
149 |
|
150 |
# Create the Gradio interface
|
151 |
+
with gr.Blocks(theme='monochrome') as demo:
|
152 |
gr.HTML(
|
153 |
"""
|
154 |
+
<h1><center>Guide Your Nano Bananaππ</center></h1>
|
155 |
|
156 |
<b>How to use:</b><br>
|
157 |
1. Upload or capture the first image and draw a box where you want to place an object<br>
|
|
|
192 |
from gradio_image_annotation import image_annotator
|
193 |
#first_image = ImageAnnotator(
|
194 |
first_image = image_annotator(
|
195 |
+
value=None,
|
196 |
label="Draw a box where you want to place the object",
|
197 |
image_type="pil",
|
198 |
single_box=True, # Only allow one box
|
199 |
+
disable_edit_boxes=True,
|
200 |
show_download_button=False,
|
201 |
show_share_button=False,
|
202 |
box_thickness=3,
|
203 |
box_selected_thickness=4,
|
|
|
204 |
show_label=True,
|
205 |
+
#image_mode="RGB",
|
206 |
#box_min_size=20,
|
207 |
)
|
208 |
|
|
|
215 |
height=400,
|
216 |
)
|
217 |
# Generate button
|
218 |
+
generate_btn = gr.Button("Step 3: π Generate Composite Image", variant="primary", size="lg")
|
219 |
|
220 |
# Output section
|
221 |
with gr.Column():
|