Spaces:
Sleeping
Sleeping
BertChristiaens
commited on
Commit
•
b054e3b
1
Parent(s):
dce7d1f
example
Browse files- .gitattributes +1 -0
- app.py +11 -9
- content/output_3.png +3 -0
.gitattributes
CHANGED
@@ -50,3 +50,4 @@ content/keep[[:space:]]background[[:space:]]1.png filter=lfs diff=lfs merge=lfs
|
|
50 |
content/keep[[:space:]]background[[:space:]]2.png filter=lfs diff=lfs merge=lfs -text
|
51 |
content/output_2.png filter=lfs diff=lfs merge=lfs -text
|
52 |
content/example_3.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
50 |
content/keep[[:space:]]background[[:space:]]2.png filter=lfs diff=lfs merge=lfs -text
|
51 |
content/output_2.png filter=lfs diff=lfs merge=lfs -text
|
52 |
content/example_3.jpg filter=lfs diff=lfs merge=lfs -text
|
53 |
+
content/output_3.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -29,6 +29,13 @@ def on_upload() -> None:
|
|
29 |
if 'output_image' in st.session_state:
|
30 |
del st.session_state['output_image']
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
def check_reset_state() -> bool:
|
34 |
"""Check whether the UI elements need to be reset
|
@@ -345,15 +352,10 @@ def main():
|
|
345 |
move_image('example_image_3', 'initial_image', remove_state=True, rerun=True)
|
346 |
|
347 |
st.write("## Generated examples")
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
st.image(Image.open("content/keep background 2.png"), caption="Generated example, regenerating certain objects in the room", use_column_width=True)
|
353 |
-
with col_ex_1:
|
354 |
-
st.image(Image.open("content/output_0.png"), caption="Generated example, regenerating certain objects in the room", use_column_width=True)
|
355 |
-
st.image(Image.open("content/segmentation window.png"), caption="Generated example, regenerating certain objects in the room", use_column_width=True)
|
356 |
-
|
357 |
else:
|
358 |
make_prompt_row()
|
359 |
|
|
|
29 |
if 'output_image' in st.session_state:
|
30 |
del st.session_state['output_image']
|
31 |
|
32 |
+
def make_image_row(image_0, image_1):
|
33 |
+
col_0, col_1 = st.columns(2)
|
34 |
+
with col_0:
|
35 |
+
st.image(image_0, use_column_width=True)
|
36 |
+
with col_1:
|
37 |
+
st.image(image_1, use_column_width=True)
|
38 |
+
|
39 |
|
40 |
def check_reset_state() -> bool:
|
41 |
"""Check whether the UI elements need to be reset
|
|
|
352 |
move_image('example_image_3', 'initial_image', remove_state=True, rerun=True)
|
353 |
|
354 |
st.write("## Generated examples")
|
355 |
+
make_image_row(Image.open("content/output_1.png"), Image.open("content/regen_example.png"))
|
356 |
+
make_image_row(Image.open("content/keep background 2.png"), Image.open("content/output_0.png"))
|
357 |
+
make_image_row(Image.open("content/segmentation window.png"), Image.open("content/output_3.png"))
|
358 |
+
|
|
|
|
|
|
|
|
|
|
|
359 |
else:
|
360 |
make_prompt_row()
|
361 |
|
content/output_3.png
ADDED
Git LFS Details
|