Spaces:
Runtime error
Runtime error
Commit
·
bd4ccf4
1
Parent(s):
6a46ded
docs
Browse files
app.py
CHANGED
|
@@ -293,6 +293,17 @@ def main():
|
|
| 293 |
"so the user can keep elements of their room and change specific parts of the image."
|
| 294 |
""
|
| 295 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
st.write("### Testing images")
|
| 297 |
st.write("If you don't have any pictures close, you can use one of these images to test the model:")
|
| 298 |
|
|
@@ -313,9 +324,10 @@ def main():
|
|
| 313 |
st.write("## Generated examples")
|
| 314 |
col_ex_0, col_ex_1 = st.columns(2)
|
| 315 |
with col_ex_0:
|
| 316 |
-
st.image(Image.open("content/output_1.png"), caption="Generated example
|
|
|
|
| 317 |
with col_ex_1:
|
| 318 |
-
st.image(Image.open("content/output_0.png"), caption="Generated example
|
| 319 |
|
| 320 |
else:
|
| 321 |
make_prompt_row()
|
|
|
|
| 293 |
"so the user can keep elements of their room and change specific parts of the image."
|
| 294 |
""
|
| 295 |
)
|
| 296 |
+
|
| 297 |
+
st.write("### Trivia")
|
| 298 |
+
st.write("The first time someone uses the demo after startup, the models still need to be loaded into memory. "
|
| 299 |
+
"After this initial load, the model is cached as a resource and can be used for all the users. "
|
| 300 |
+
"To avoid simultaneous requests, we have implemented a queueing mechanism that ensures that only one "
|
| 301 |
+
"user accesses the model at a time (similar to the Gradio framework).\n"
|
| 302 |
+
)
|
| 303 |
+
st.write("To enable the features in the demo, we calculate the underlying segmentation maps and categories that "
|
| 304 |
+
"are present in the image. This allows us to hide some of the manual work for the user, and "
|
| 305 |
+
"by doing this, the users don't need to make a segmentation map in an external tool. Everything needed can be done within this demo."
|
| 306 |
+
)
|
| 307 |
st.write("### Testing images")
|
| 308 |
st.write("If you don't have any pictures close, you can use one of these images to test the model:")
|
| 309 |
|
|
|
|
| 324 |
st.write("## Generated examples")
|
| 325 |
col_ex_0, col_ex_1 = st.columns(2)
|
| 326 |
with col_ex_0:
|
| 327 |
+
st.image(Image.open("content/output_1.png"), caption="Generated example, regenerating certain objects in the room", use_column_width=True)
|
| 328 |
+
st.image(Image.open("content/regen_example.png"), caption="Generated example, regenerating certain objects in the room", use_column_width=True)
|
| 329 |
with col_ex_1:
|
| 330 |
+
st.image(Image.open("content/output_0.png"), caption="Generated example, regenerating certain objects in the room", use_column_width=True)
|
| 331 |
|
| 332 |
else:
|
| 333 |
make_prompt_row()
|