Spaces:
Runtime error
Runtime error
Commit
·
161c8b5
1
Parent(s):
1af0054
add content
Browse files- .gitattributes +4 -0
- app.py +22 -7
- content/example_0.png +0 -0
- content/example_1.jpg +0 -0
- content/output_0.png +3 -0
- content/output_1.png +3 -0
.gitattributes
CHANGED
|
@@ -37,3 +37,7 @@ content/inpainting_after.png filter=lfs diff=lfs merge=lfs -text
|
|
| 37 |
content/inpainting_before.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
content/inpainting_sidebar.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
content/regen_example.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
content/inpainting_before.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
content/inpainting_sidebar.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
content/regen_example.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
content/example_0.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
content/example_1.jpg filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
content/output_0.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
content/output_1.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
|
@@ -294,15 +294,30 @@ def main():
|
|
| 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 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
else:
|
| 307 |
make_prompt_row()
|
| 308 |
|
|
|
|
| 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 |
+
|
| 298 |
st.session_state['example_image_0'] = Image.open("content/example_0.png")
|
| 299 |
st.session_state['example_image_1'] = Image.open("content/example_1.jpg")
|
| 300 |
+
|
| 301 |
+
col_im_0, col_im_1 = st.columns(2)
|
| 302 |
+
|
| 303 |
+
with col_im_0:
|
| 304 |
+
st.image(st.session_state['example_image_0'], caption="Example image 1", use_column_width=True)
|
| 305 |
+
if st.button("Use example 1"):
|
| 306 |
+
move_image('example_image_0', 'input_image', remove_state=True, rerun=False)
|
| 307 |
+
move_image('example_image_0', 'initial_image', remove_state=True, rerun=True)
|
| 308 |
+
with col_im_1:
|
| 309 |
+
st.image(st.session_state['example_image_1'], caption="Example image 2", use_column_width=True)
|
| 310 |
+
if st.button("Use example 2"):
|
| 311 |
+
move_image('example_image_1', 'input_image', remove_state=True, rerun=False)
|
| 312 |
+
move_image('example_image_1', 'initial_image', remove_state=True, rerun=True)
|
| 313 |
+
|
| 314 |
+
st.write("## Generated examples")
|
| 315 |
+
col_ex_0, col_ex_1 = st.columns(2)
|
| 316 |
+
with col_ex_0:
|
| 317 |
+
st.image(Image.open("content/output_1.png"), caption="Generated example 1, regenerating certain objects in the room", use_column_width=True)
|
| 318 |
+
with col_ex_1:
|
| 319 |
+
st.image(Image.open("content/output_0.png"), caption="Generated example 1, regenerating certain objects in the room", use_column_width=True)
|
| 320 |
+
|
| 321 |
else:
|
| 322 |
make_prompt_row()
|
| 323 |
|
content/example_0.png
CHANGED
|
|
Git LFS Details
|
content/example_1.jpg
CHANGED
|
|
Git LFS Details
|
content/output_0.png
ADDED
|
Git LFS Details
|
content/output_1.png
ADDED
|
Git LFS Details
|