Spaces:
Runtime error
Runtime error
taka-yamakoshi
commited on
Commit
·
861ad10
1
Parent(s):
2ce61c2
build
Browse files
app.py
CHANGED
@@ -258,13 +258,19 @@ if __name__=='__main__':
|
|
258 |
index=['Sentence 1','Sentence 2'])
|
259 |
st.dataframe(df.style.highlight_max(axis=1))
|
260 |
|
|
|
|
|
|
|
|
|
|
|
261 |
multihead = True
|
262 |
-
effect_array = []
|
263 |
assert np.all(np.array(pron_locs['sent_1'])==np.array(pron_locs['sent_2']))
|
264 |
assert np.all(np.array(option_1_locs['sent_1'])==np.array(option_1_locs['sent_2']))
|
265 |
assert np.all(np.array(option_2_locs['sent_1'])==np.array(option_2_locs['sent_2']))
|
266 |
token_id_list = pron_locs['sent_1'] + option_1_locs['sent_1'] + option_2_locs['sent_1']
|
267 |
st.write(token_id_list)
|
|
|
|
|
268 |
for token_id in token_id_list:
|
269 |
token_id += 1
|
270 |
effect_list = []
|
|
|
258 |
index=['Sentence 1','Sentence 2'])
|
259 |
st.dataframe(df.style.highlight_max(axis=1))
|
260 |
|
261 |
+
compare_1 = np.array(masked_ids_option_1['sent_1'])!=np.array(masked_ids_option_1['sent_2'])
|
262 |
+
compare_2 = np.array(masked_ids_option_2['sent_1'])!=np.array(masked_ids_option_2['sent_2'])
|
263 |
+
st.write(compare_1)
|
264 |
+
st.write(compare_2)
|
265 |
+
|
266 |
multihead = True
|
|
|
267 |
assert np.all(np.array(pron_locs['sent_1'])==np.array(pron_locs['sent_2']))
|
268 |
assert np.all(np.array(option_1_locs['sent_1'])==np.array(option_1_locs['sent_2']))
|
269 |
assert np.all(np.array(option_2_locs['sent_1'])==np.array(option_2_locs['sent_2']))
|
270 |
token_id_list = pron_locs['sent_1'] + option_1_locs['sent_1'] + option_2_locs['sent_1']
|
271 |
st.write(token_id_list)
|
272 |
+
|
273 |
+
effect_array = []
|
274 |
for token_id in token_id_list:
|
275 |
token_id += 1
|
276 |
effect_list = []
|