Spaces:
Runtime error
Runtime error
Commit
路
68602cb
1
Parent(s):
582d950
Update app.py
Browse files- app/streamlit/app.py +9 -7
app/streamlit/app.py
CHANGED
@@ -84,16 +84,18 @@ if prompt != "":
|
|
84 |
)
|
85 |
|
86 |
try:
|
87 |
-
#
|
88 |
-
|
89 |
-
|
|
|
|
|
90 |
|
91 |
margin = 0.1 # for better position of zoom in arrow
|
92 |
n_columns = 3
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
|
98 |
st.button("Again!", key="again_button")
|
99 |
|
|
|
84 |
)
|
85 |
|
86 |
try:
|
87 |
+
# FRITS: Det er den her der failer:
|
88 |
+
backend_url = st.secrets["BACKEND_SERVER"]
|
89 |
+
|
90 |
+
print(f"Getting selections: {prompt}")
|
91 |
+
selected = get_images_from_backend(prompt, backend_url)
|
92 |
|
93 |
margin = 0.1 # for better position of zoom in arrow
|
94 |
n_columns = 3
|
95 |
+
cols = st.columns([1] + [margin, 1] * (n_columns - 1))
|
96 |
+
for i, img in enumerate(selected):
|
97 |
+
cols[(i % n_columns) * 2].image(img)
|
98 |
+
container.markdown(f"**{prompt}**")
|
99 |
|
100 |
st.button("Again!", key="again_button")
|
101 |
|