Omnibus commited on
Commit
e960a9a
·
verified ·
1 Parent(s): 8fcaabd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -4,9 +4,10 @@ from PIL import Image
4
  # PIL accesses images in Cartesian co-ordinates, so it is Image[columns, rows]
5
  img = Image.new( 'RGB', (250,250), "black") # create a new black image
6
  pixels = img.load() # create the pixel map
7
- print(pixels)
8
  for i in range(img.size[0]): # for every col:
9
  for j in range(img.size[1]): # For every row
10
  pixels[i,j] = (i, j, 100) # set the colour accordingly
11
-
12
- gr.Image(img)
 
 
4
  # PIL accesses images in Cartesian co-ordinates, so it is Image[columns, rows]
5
  img = Image.new( 'RGB', (250,250), "black") # create a new black image
6
  pixels = img.load() # create the pixel map
7
+ print(dir(pixels))
8
  for i in range(img.size[0]): # for every col:
9
  for j in range(img.size[1]): # For every row
10
  pixels[i,j] = (i, j, 100) # set the colour accordingly
11
+ with gr.Blocks() as app:
12
+ gr.Image(img)
13
+ app.launch()