Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
|
3 |
def display_sketch(sketch):
|
4 |
-
|
5 |
-
|
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
|