Spaces:
Runtime error
Runtime error
Update ui/gradio_ui.py
Browse files- ui/gradio_ui.py +2 -2
ui/gradio_ui.py
CHANGED
|
@@ -7,7 +7,7 @@ import numpy as np
|
|
| 7 |
|
| 8 |
def get_img_from_sketchpad(img):
|
| 9 |
#global SER_SKETCH
|
| 10 |
-
return Image.fromarray(img["composite"])
|
| 11 |
|
| 12 |
#def set_ser_sketch(img):
|
| 13 |
#global SER_SKETCH
|
|
@@ -17,7 +17,7 @@ def ui(controller):#get_first_result,get_second_result): #controller):
|
|
| 17 |
with gr.Blocks() as ui:
|
| 18 |
with gr.Row():
|
| 19 |
with gr.Column():
|
| 20 |
-
sketch=gr.Sketchpad(sources = 'upload', label='Sketch', type='numpy', image_mode="
|
| 21 |
ser_image=gr.Image(type="pil")#, visible=False)
|
| 22 |
|
| 23 |
with gr.Column():
|
|
|
|
| 7 |
|
| 8 |
def get_img_from_sketchpad(img):
|
| 9 |
#global SER_SKETCH
|
| 10 |
+
return Image.fromarray((img["composite"]))#,'L')
|
| 11 |
|
| 12 |
#def set_ser_sketch(img):
|
| 13 |
#global SER_SKETCH
|
|
|
|
| 17 |
with gr.Blocks() as ui:
|
| 18 |
with gr.Row():
|
| 19 |
with gr.Column():
|
| 20 |
+
sketch=gr.Sketchpad(sources = 'upload', label='Sketch', type='numpy', image_mode="L", brush=gr.Brush()) #gr.Image(sources = 'upload', label='Sketch', type = 'pil')
|
| 21 |
ser_image=gr.Image(type="pil")#, visible=False)
|
| 22 |
|
| 23 |
with gr.Column():
|