Spaces:
Build error
Build error
Commit
·
9705209
1
Parent(s):
ddac224
app.py updates
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from PIL import Image, ImageDraw
|
| 3 |
|
|
@@ -45,11 +46,11 @@ def patch(i):
|
|
| 45 |
img=i//(36*36)
|
| 46 |
p=i%(36*36)
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
x=p//36
|
| 51 |
y=p%36
|
| 52 |
-
imc=
|
| 53 |
return imc
|
| 54 |
|
| 55 |
|
|
|
|
| 1 |
+
from datasets.arrow_dataset import InMemoryTable
|
| 2 |
import streamlit as st
|
| 3 |
from PIL import Image, ImageDraw
|
| 4 |
|
|
|
|
| 46 |
img=i//(36*36)
|
| 47 |
p=i%(36*36)
|
| 48 |
|
| 49 |
+
imm=ds[img]['image']
|
| 50 |
|
| 51 |
x=p//36
|
| 52 |
y=p%36
|
| 53 |
+
imc=imm.crop((x*16,y*16,(x+1)*16,(y+1)*16))
|
| 54 |
return imc
|
| 55 |
|
| 56 |
|