Spaces:
Build error
Build error
Commit
·
fdef182
1
Parent(s):
7d11428
app.py updates
Browse files
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(
|
| 46 |
-
st.write(
|
| 47 |
-
img=
|
| 48 |
-
p=
|
| 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
|
| 77 |
-
st.session_state["sideimg"][
|
|
|
|
|
|
|
| 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 |
|