Jangai commited on
Commit
f3e3fa2
·
verified ·
1 Parent(s): cff0816

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,11 +1,10 @@
1
  import gradio as gr
 
 
2
 
3
  def display_sketch(sketch):
4
- import numpy as np
5
- from PIL import Image
6
-
7
- image_data = sketch["image"]
8
- img = Image.fromarray(np.uint8(image_data))
9
  return img
10
 
11
  # Define the sketchpad component
 
1
  import gradio as gr
2
+ from PIL import Image
3
+ import numpy as np
4
 
5
  def display_sketch(sketch):
6
+ # Convert the sketch numpy array to an image
7
+ img = Image.fromarray(np.uint8(sketch))
 
 
 
8
  return img
9
 
10
  # Define the sketchpad component