vives commited on
Commit
ada499d
·
1 Parent(s): 5af806a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -13,21 +13,20 @@ if xl1 is not None and xl2 is not None:
13
  xl1 = None
14
  xl2 = None
15
  else:
16
- for t1,t2 in zip(df1.iterrows(),df2.iterrows()):
 
 
 
 
17
  r1 = t1[1]
18
- r2 = t2[1]
19
- assert r1["KP"] == r2["KP"]
20
  kps1 = json.loads(r1["Matched KPs"].replace("'", '"'))
21
- kps2 = json.loads(r2["Matched KPs"].replace("'", '"'))
22
- for kp1, kp2 in zip(kps1.keys(),kps2.keys()):
23
  if kps1[kp1] > 0.99:
24
  kps1.pop(kp1)
25
- if kps2[kp2] > 0.99:
26
- kps2.pop(kp2)
27
  #now display the kps
28
- if kps1 == {} and kps2 == {}:
29
  continue
30
- if kps1 != {}:
31
  for kp1 in kps1.keys():
32
  col1, col2, col3 = st.columns(3)
33
  with col1:
@@ -35,5 +34,6 @@ if xl1 is not None and xl2 is not None:
35
  with col2:
36
  st.write(f"kp: {kp1} , distance: {kps1[kp1]}")
37
  with col3:
38
- st.radio("Appropriate?", [True, False])
 
39
 
 
13
  xl1 = None
14
  xl2 = None
15
  else:
16
+ i = 0
17
+ choices = []
18
+
19
+ st.write("First excel file")
20
+ for t1 in df1.iterrows():
21
  r1 = t1[1]
 
 
22
  kps1 = json.loads(r1["Matched KPs"].replace("'", '"'))
23
+ for kp1kps1.keys():
 
24
  if kps1[kp1] > 0.99:
25
  kps1.pop(kp1)
 
 
26
  #now display the kps
27
+ if kps1 == {}:
28
  continue
29
+ else:
30
  for kp1 in kps1.keys():
31
  col1, col2, col3 = st.columns(3)
32
  with col1:
 
34
  with col2:
35
  st.write(f"kp: {kp1} , distance: {kps1[kp1]}")
36
  with col3:
37
+ choices.append(st.radio("Appropriate?", [True, False],id = i))
38
+ i+=1
39