Spaces:
Sleeping
Sleeping
put images outside of container
Browse files
app.py
CHANGED
@@ -42,8 +42,6 @@ class GalleryApp:
|
|
42 |
# with selecters[0]:
|
43 |
# tag = st.selectbox('Select a tag', prompt_tags)
|
44 |
|
45 |
-
images = st.container()
|
46 |
-
|
47 |
with st.sidebar:
|
48 |
prompt_tags = self.promptBook['tag'].unique()
|
49 |
# sort tags by alphabetical order
|
@@ -80,31 +78,28 @@ class GalleryApp:
|
|
80 |
st.write('**Seed**')
|
81 |
st.caption(f"{items['seed'][0]}")
|
82 |
|
83 |
-
with images:
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
col_num = st.slider('Number of columns', min_value=1, max_value=9, value=4, step=1, key='col_num')
|
106 |
-
self.gallery(items, col_num, info)
|
107 |
-
# st.write(items)
|
108 |
|
109 |
|
110 |
if __name__ == '__main__':
|
|
|
42 |
# with selecters[0]:
|
43 |
# tag = st.selectbox('Select a tag', prompt_tags)
|
44 |
|
|
|
|
|
45 |
with st.sidebar:
|
46 |
prompt_tags = self.promptBook['tag'].unique()
|
47 |
# sort tags by alphabetical order
|
|
|
78 |
st.write('**Seed**')
|
79 |
st.caption(f"{items['seed'][0]}")
|
80 |
|
81 |
+
# with images:
|
82 |
+
selecters = st.columns([1, 1, 2])
|
83 |
+
|
84 |
+
with selecters[0]:
|
85 |
+
sort_by = st.selectbox('Sort by', items.columns[11: -1])
|
86 |
+
|
87 |
+
with selecters[1]:
|
88 |
+
order = st.selectbox('Order', ['Ascending', 'Descending'], index=1 if sort_by == 'clip_score' or sort_by == 'model_download_count' else 0)
|
89 |
+
if order == 'Ascending':
|
90 |
+
order = True
|
91 |
+
else:
|
92 |
+
order = False
|
93 |
+
|
94 |
+
items = items.sort_values(by=[sort_by], ascending=order).reset_index(drop=True)
|
95 |
+
with selecters[2]:
|
96 |
+
info = st.multiselect('Show Info',
|
97 |
+
['brisque_score', 'clip_score', 'model_download_count', 'model_name', 'model_id',
|
98 |
+
'modelVersion_name', 'modelVersion_id'],
|
99 |
+
default=sort_by)
|
100 |
+
|
101 |
+
col_num = st.slider('Number of columns', min_value=1, max_value=9, value=4, step=1, key='col_num')
|
102 |
+
self.gallery(items, col_num, info)
|
|
|
|
|
|
|
103 |
|
104 |
|
105 |
if __name__ == '__main__':
|