Spaces:
Running
Running
update summary ui
Browse files- pages/Summary.py +10 -24
pages/Summary.py
CHANGED
@@ -111,47 +111,33 @@ class DashboardApp:
|
|
111 |
icon = 'π₯'if i == 0 else 'π₯' if i == 1 else 'π₯' if i == 2 else 'π'
|
112 |
podium_display = st.columns([1, 14], gap='medium')
|
113 |
with podium_display[0]:
|
114 |
-
st.title(f'{icon}')
|
|
|
115 |
# if summary_mode == 'display':
|
116 |
# st.title(f'{icon}')
|
117 |
# elif summary_mode == 'edit':
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
with podium_display[1]:
|
122 |
-
title_display = st.columns([
|
123 |
with title_display[0]:
|
124 |
st.write(f'##### {model_name}, {modelVersion_name}')
|
125 |
# st.write(f'Ranking Score: {winning_times}')
|
126 |
with title_display[1]:
|
127 |
-
# image_display = st.selectbox('image display', ['Featured', 'All Images'], key=f'image_display_{modelVersion_id}', label_visibility='collapsed')
|
128 |
-
image_display = st.toggle('Show all images', key=f'image_display_{modelVersion_id}')
|
129 |
-
|
130 |
-
with title_display[2]:
|
131 |
st.link_button('Download', url, use_container_width=True)
|
132 |
-
with title_display[
|
133 |
st.link_button('Civitai', f'https://civitai.com/models/{model_id}?modelVersionId={modelVersion_id}', use_container_width=True, type='primary')
|
134 |
# st.write(f'[Civitai Page](https://civitai.com/models/{model_id}?modelVersionId={modelVersion_id}), [Model Download Link]({url}), Ranking Score: {winning_times}')
|
135 |
# with st.expander(f'**{icon} {model_name}, [{modelVersion_name}](https://civitai.com/models/{model_id}?modelVersionId={modelVersion_id})**, Ranking Score: {winning_times}'):
|
136 |
-
with title_display[4]:
|
137 |
-
settop = st.button('π', key=f'settop_{modelVersion_id}', help='Set this model to the top',
|
138 |
-
disabled=i == 0, on_click=self.switch_order, args=(tag, i, 0),
|
139 |
-
use_container_width=True)
|
140 |
-
with title_display[5]:
|
141 |
-
moveup = st.button('β¬', key=f'moveup_{modelVersion_id}', help='Move this model up',
|
142 |
-
disabled=i == 0, on_click=self.switch_order, args=(tag, i, i - 1),
|
143 |
-
use_container_width=True)
|
144 |
-
with title_display[6]:
|
145 |
-
movedown = st.button('β¬', key=f'movedown_{modelVersion_id}', help='Move this model down',
|
146 |
-
disabled=i == n - 1, on_click=self.switch_order, args=(tag, i, i + 1),
|
147 |
-
use_container_width=True)
|
148 |
|
|
|
149 |
if not image_display:
|
150 |
example_images = self.promptBook[self.promptBook['prompt_id'].isin(example_prompts) & (self.promptBook['modelVersion_id']==modelVersion_id)]['image_id'].values
|
151 |
example_images = [f"https://modelcofferbucket.s3-accelerate.amazonaws.com/{image}.png" for image in example_images]
|
152 |
clickable_images(
|
153 |
example_images,
|
154 |
-
img_style={"margin": "5px", "height": "
|
155 |
)
|
156 |
|
157 |
else:
|
@@ -171,7 +157,7 @@ class DashboardApp:
|
|
171 |
images = [f"https://modelcofferbucket.s3-accelerate.amazonaws.com/{image}.png" for image in images]
|
172 |
clickable_images(
|
173 |
images,
|
174 |
-
img_style={"margin": "5px", "height": "
|
175 |
)
|
176 |
st.write('π It may take a while to load all images. Please be patient, and **NEVER USE THE REFRESH BUTTON ON YOUR BROWSER**.')
|
177 |
|
|
|
111 |
icon = 'π₯'if i == 0 else 'π₯' if i == 1 else 'π₯' if i == 2 else 'π'
|
112 |
podium_display = st.columns([1, 14], gap='medium')
|
113 |
with podium_display[0]:
|
114 |
+
# st.title(f'{icon}')
|
115 |
+
st.write(f'# {icon}')
|
116 |
# if summary_mode == 'display':
|
117 |
# st.title(f'{icon}')
|
118 |
# elif summary_mode == 'edit':
|
119 |
+
settop = st.button('π', key=f'settop_{modelVersion_id}', help='Set this model to the top', disabled=i == 0, on_click=self.switch_order, args=(tag, i, 0))
|
120 |
+
moveup = st.button('β¬', key=f'moveup_{modelVersion_id}', help='Move this model up', disabled=i == 0, on_click=self.switch_order, args=(tag, i, i - 1))
|
121 |
+
movedown = st.button('β¬', key=f'movedown_{modelVersion_id}', help='Move this model down', disabled=i == n - 1, on_click=self.switch_order, args=(tag, i, i + 1))
|
122 |
with podium_display[1]:
|
123 |
+
title_display = st.columns([4, 1, 1])
|
124 |
with title_display[0]:
|
125 |
st.write(f'##### {model_name}, {modelVersion_name}')
|
126 |
# st.write(f'Ranking Score: {winning_times}')
|
127 |
with title_display[1]:
|
|
|
|
|
|
|
|
|
128 |
st.link_button('Download', url, use_container_width=True)
|
129 |
+
with title_display[2]:
|
130 |
st.link_button('Civitai', f'https://civitai.com/models/{model_id}?modelVersionId={modelVersion_id}', use_container_width=True, type='primary')
|
131 |
# st.write(f'[Civitai Page](https://civitai.com/models/{model_id}?modelVersionId={modelVersion_id}), [Model Download Link]({url}), Ranking Score: {winning_times}')
|
132 |
# with st.expander(f'**{icon} {model_name}, [{modelVersion_name}](https://civitai.com/models/{model_id}?modelVersionId={modelVersion_id})**, Ranking Score: {winning_times}'):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
+
image_display = st.toggle('Show all images', key=f'image_display_{modelVersion_id}')
|
135 |
if not image_display:
|
136 |
example_images = self.promptBook[self.promptBook['prompt_id'].isin(example_prompts) & (self.promptBook['modelVersion_id']==modelVersion_id)]['image_id'].values
|
137 |
example_images = [f"https://modelcofferbucket.s3-accelerate.amazonaws.com/{image}.png" for image in example_images]
|
138 |
clickable_images(
|
139 |
example_images,
|
140 |
+
img_style={"margin": "5px", "height": "120px"}
|
141 |
)
|
142 |
|
143 |
else:
|
|
|
157 |
images = [f"https://modelcofferbucket.s3-accelerate.amazonaws.com/{image}.png" for image in images]
|
158 |
clickable_images(
|
159 |
images,
|
160 |
+
img_style={"margin": "5px", "height": "120px"}
|
161 |
)
|
162 |
st.write('π It may take a while to load all images. Please be patient, and **NEVER USE THE REFRESH BUTTON ON YOUR BROWSER**.')
|
163 |
|