Jangai commited on
Commit
7e53392
·
verified ·
1 Parent(s): ea1e865

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -1,16 +1,12 @@
1
  import gradio as gr
2
- import numpy as np
3
- from PIL import Image
4
 
5
  def display_sketch(sketch):
6
- # Convert the sketch (which is a numpy array) to a PIL image
7
- image = Image.fromarray(sketch)
8
- return image
9
 
10
  with gr.Blocks() as demo:
11
- sketchpad = gr.Sketchpad(label="Draw Something", shape=(256, 256))
12
  output_image = gr.Image(label="Your Sketch")
13
-
14
  sketchpad.submit(display_sketch, inputs=sketchpad, outputs=output_image)
15
 
16
  demo.launch()
 
1
  import gradio as gr
 
 
2
 
3
  def display_sketch(sketch):
4
+ return sketch
 
 
5
 
6
  with gr.Blocks() as demo:
7
+ sketchpad = gr.Sketchpad(label="Draw Something")
8
  output_image = gr.Image(label="Your Sketch")
9
+
10
  sketchpad.submit(display_sketch, inputs=sketchpad, outputs=output_image)
11
 
12
  demo.launch()