Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -203,7 +203,6 @@ if st.button('ํ์ธ'):
|
|
203 |
str_ans_topk = [loc_tbl['ํญ๋ชฉ๋ช
'][loc_tbl['์ฝ๋'] == k] for k in num_ans_topk]
|
204 |
percent_ans_topk = list(topk_values)
|
205 |
|
206 |
-
print(percent_ans_topk)
|
207 |
# print(num_ans, str_ans)
|
208 |
# print(num_ans_topk)
|
209 |
|
@@ -227,8 +226,10 @@ if st.button('ํ์ธ'):
|
|
227 |
# print(str_ans, type(str_ans))
|
228 |
|
229 |
str_ans_topk_list = []
|
|
|
230 |
for i in range(k):
|
231 |
str_ans_topk_list.append(str_ans_topk[i].iloc[0])
|
|
|
232 |
|
233 |
# print(str_ans_topk_list)
|
234 |
|
@@ -236,7 +237,7 @@ if st.button('ํ์ธ'):
|
|
236 |
'NO': range(1, k+1),
|
237 |
'์ธ๋ถ๋ฅ ์ฝ๋': num_ans_topk,
|
238 |
'์ธ๋ถ๋ฅ ๋ช
์นญ': str_ans_topk_list,
|
239 |
-
'ํ๋ฅ ':
|
240 |
})
|
241 |
ans_topk_df = ans_topk_df.set_index('NO')
|
242 |
|
|
|
203 |
str_ans_topk = [loc_tbl['ํญ๋ชฉ๋ช
'][loc_tbl['์ฝ๋'] == k] for k in num_ans_topk]
|
204 |
percent_ans_topk = list(topk_values)
|
205 |
|
|
|
206 |
# print(num_ans, str_ans)
|
207 |
# print(num_ans_topk)
|
208 |
|
|
|
226 |
# print(str_ans, type(str_ans))
|
227 |
|
228 |
str_ans_topk_list = []
|
229 |
+
percent_ans_topk_list = []
|
230 |
for i in range(k):
|
231 |
str_ans_topk_list.append(str_ans_topk[i].iloc[0])
|
232 |
+
percent_ans_topk_list.append(percent_ans_topk[i].iloc[0])
|
233 |
|
234 |
# print(str_ans_topk_list)
|
235 |
|
|
|
237 |
'NO': range(1, k+1),
|
238 |
'์ธ๋ถ๋ฅ ์ฝ๋': num_ans_topk,
|
239 |
'์ธ๋ถ๋ฅ ๋ช
์นญ': str_ans_topk_list,
|
240 |
+
'ํ๋ฅ ': percent_ans_topk_list
|
241 |
})
|
242 |
ans_topk_df = ans_topk_df.set_index('NO')
|
243 |
|