Spaces:
Running
on
A10G
Running
on
A10G
Commit
·
1af0054
1
Parent(s):
40be677
add example images
Browse files- app.py +11 -1
- content/example_0.png +0 -0
- content/example_1.jpg +0 -0
app.py
CHANGED
|
@@ -269,7 +269,6 @@ def main():
|
|
| 269 |
|
| 270 |
# check if there is an input_image
|
| 271 |
if not ('input_image' in st.session_state and st.session_state['input_image'] is not None):
|
| 272 |
-
print("Image not present")
|
| 273 |
st.success("Upload an image to start")
|
| 274 |
st.write("Welcome to the interior design controlnet demo! "
|
| 275 |
"You can start by uploading a picture of your room, after which you will see "
|
|
@@ -293,6 +292,17 @@ def main():
|
|
| 293 |
"so the user can keep elements of their room and change specific parts of the image."
|
| 294 |
""
|
| 295 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
else:
|
| 297 |
make_prompt_row()
|
| 298 |
|
|
|
|
| 269 |
|
| 270 |
# check if there is an input_image
|
| 271 |
if not ('input_image' in st.session_state and st.session_state['input_image'] is not None):
|
|
|
|
| 272 |
st.success("Upload an image to start")
|
| 273 |
st.write("Welcome to the interior design controlnet demo! "
|
| 274 |
"You can start by uploading a picture of your room, after which you will see "
|
|
|
|
| 292 |
"so the user can keep elements of their room and change specific parts of the image."
|
| 293 |
""
|
| 294 |
)
|
| 295 |
+
st.write("### Testing images")
|
| 296 |
+
st.write("If you don't have any pictures close, you can use one of these images to test the model:")
|
| 297 |
+
st.session_state['example_image_0'] = Image.open("content/example_0.png")
|
| 298 |
+
st.session_state['example_image_1'] = Image.open("content/example_1.jpg")
|
| 299 |
+
st.image(st.session_state['example_image_0'], caption="Example image 1", use_column_width=True)
|
| 300 |
+
if st.button("Use example 1"):
|
| 301 |
+
move_image('example_image_0', 'initial_image', remove_state=True, rerun=True)
|
| 302 |
+
|
| 303 |
+
st.image(st.session_state['example_image_1'], caption="Example image 2", use_column_width=True)
|
| 304 |
+
if st.button("Use example 2"):
|
| 305 |
+
move_image('example_image_1', 'initial_image', remove_state=True, rerun=True)
|
| 306 |
else:
|
| 307 |
make_prompt_row()
|
| 308 |
|
content/example_0.png
ADDED
|
content/example_1.jpg
ADDED
|