Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,9 +2,11 @@ import gradio as gr
|
|
| 2 |
from PIL import Image
|
| 3 |
|
| 4 |
# PIL accesses images in Cartesian co-ordinates, so it is Image[columns, rows]
|
| 5 |
-
img = Image.new( 'RGB', (250,250), (0,0,0)) # create a new black image
|
| 6 |
-
pixels = img.load() # create the pixel map
|
| 7 |
-
def get_pixels(
|
|
|
|
|
|
|
| 8 |
pixel_box=[]
|
| 9 |
for i in range(img.size[0]): # for every col:
|
| 10 |
for j in range(img.size[1]): # For every row
|
|
|
|
| 2 |
from PIL import Image
|
| 3 |
|
| 4 |
# PIL accesses images in Cartesian co-ordinates, so it is Image[columns, rows]
|
| 5 |
+
#img = Image.new( 'RGB', (250,250), (0,0,0)) # create a new black image
|
| 6 |
+
#pixels = img.load() # create the pixel map
|
| 7 |
+
def get_pixels(img):
|
| 8 |
+
pixels = img.load() # create the pixel map
|
| 9 |
+
|
| 10 |
pixel_box=[]
|
| 11 |
for i in range(img.size[0]): # for every col:
|
| 12 |
for j in range(img.size[1]): # For every row
|