Spaces:
Running
Running
hiding image ranking ui
Browse files- Home.py +1 -1
- pages/Ranking.py +13 -12
Home.py
CHANGED
@@ -42,7 +42,7 @@ if __name__ == '__main__':
|
|
42 |
|
43 |
st.set_page_config(page_title="Login", page_icon="🏠", layout="wide")
|
44 |
st.write('A Research by MAPS Lab, NYU Shanghai')
|
45 |
-
st.title("
|
46 |
st.write(
|
47 |
"This is an web application to collect personal preference to ai generated images. \
|
48 |
You can know which model you like most after you finish the survey."
|
|
|
42 |
|
43 |
st.set_page_config(page_title="Login", page_icon="🏠", layout="wide")
|
44 |
st.write('A Research by MAPS Lab, NYU Shanghai')
|
45 |
+
st.title("Welcome to GEMRec Gallery Webapp!")
|
46 |
st.write(
|
47 |
"This is an web application to collect personal preference to ai generated images. \
|
48 |
You can know which model you like most after you finish the survey."
|
pages/Ranking.py
CHANGED
@@ -134,19 +134,20 @@ if __name__ == "__main__":
|
|
134 |
# st.write('You have checked ' + str(len(selected_modelVersions)) + ' images.')
|
135 |
roster, promptBook, images_ds = load_hf_dataset()
|
136 |
print(st.session_state.selected_dict)
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
140 |
# st.write("## promptBook")
|
141 |
# st.write(promptBook)
|
142 |
|
143 |
-
# only select the part of the promptbook where tag is the same as st.session_state.selected_dict.keys(), while model version ids are the same as corresponding values to each key
|
144 |
-
promptBook_selected = pd.DataFrame()
|
145 |
-
for key, value in st.session_state.selected_dict.items():
|
146 |
-
|
147 |
-
promptBook_selected = promptBook_selected.reset_index(drop=True)
|
148 |
-
images_endpoint = "https://modelcofferbucket.s3-accelerate.amazonaws.com/"
|
149 |
-
|
150 |
-
app = RankingApp(promptBook_selected, images_endpoint, batch_size=4)
|
151 |
-
app.app()
|
152 |
|
|
|
134 |
# st.write('You have checked ' + str(len(selected_modelVersions)) + ' images.')
|
135 |
roster, promptBook, images_ds = load_hf_dataset()
|
136 |
print(st.session_state.selected_dict)
|
137 |
+
st.write("# Full function is coming soon.")
|
138 |
+
st.write("## roster")
|
139 |
+
st.write(roster[roster['modelVersion_id'].isin(selected_modelVersions)])
|
140 |
+
st.write(roster)
|
141 |
# st.write("## promptBook")
|
142 |
# st.write(promptBook)
|
143 |
|
144 |
+
# # only select the part of the promptbook where tag is the same as st.session_state.selected_dict.keys(), while model version ids are the same as corresponding values to each key
|
145 |
+
# promptBook_selected = pd.DataFrame()
|
146 |
+
# for key, value in st.session_state.selected_dict.items():
|
147 |
+
# promptBook_selected = promptBook_selected.append(promptBook[(promptBook['prompt_id'] == key) & (promptBook['modelVersion_id'].isin(value))])
|
148 |
+
# promptBook_selected = promptBook_selected.reset_index(drop=True)
|
149 |
+
# images_endpoint = "https://modelcofferbucket.s3-accelerate.amazonaws.com/"
|
150 |
+
#
|
151 |
+
# app = RankingApp(promptBook_selected, images_endpoint, batch_size=4)
|
152 |
+
# app.app()
|
153 |
|