Circularmachines commited on
Commit
fdef182
·
1 Parent(s): 7d11428

app.py updates

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -42,10 +42,10 @@ if "img" not in st.session_state:
42
  if "draw" not in st.session_state:
43
  st.session_state["draw"] = False
44
 
45
- def patch(i):
46
- st.write(i)
47
- img=i//(36*36)
48
- p=i%(36*36)
49
 
50
  imm=ds[img]['image']
51
 
@@ -73,8 +73,10 @@ def find():
73
  i=st.session_state["img"]
74
  p=point[0]*36+point[1]
75
  diff=np.linalg.norm(pred_all[np.newaxis,np.newaxis,i,p]-pred_all,axis=-1)
76
- for i in range(4):
77
- st.session_state["sideimg"][i]=patch(diff.argsort()[i])
 
 
78
 
79
 
80
 
 
42
  if "draw" not in st.session_state:
43
  st.session_state["draw"] = False
44
 
45
+ def patch(ij):
46
+ st.write(ij)
47
+ img=ij//(36*36)
48
+ p=ij%(36*36)
49
 
50
  imm=ds[img]['image']
51
 
 
73
  i=st.session_state["img"]
74
  p=point[0]*36+point[1]
75
  diff=np.linalg.norm(pred_all[np.newaxis,np.newaxis,i,p]-pred_all,axis=-1)
76
+ for ix in range(4):
77
+ st.session_state["sideimg"][ix]=patch(diff.argsort()[ix])
78
+ st.write(diff.argsort()[ix])
79
+
80
 
81
 
82