Update app.py
Browse filesreverse all change
app.py
CHANGED
@@ -105,7 +105,7 @@ def predict(input_img, ver):
|
|
105 |
drawing = model1(input_img)[0].detach()
|
106 |
|
107 |
drawing = transforms.ToPILImage()(drawing)
|
108 |
-
return drawing
|
109 |
|
110 |
title="Image to Line Drawings - Complex and Simple Portraits and Landscapes"
|
111 |
examples=[
|
@@ -122,6 +122,6 @@ examples=[
|
|
122 |
|
123 |
iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'),
|
124 |
gr.inputs.Radio(['Complex Lines','Simple Lines'], type="value", default='Simple Lines', label='version')],
|
125 |
-
|
126 |
|
127 |
-
iface.launch()
|
|
|
105 |
drawing = model1(input_img)[0].detach()
|
106 |
|
107 |
drawing = transforms.ToPILImage()(drawing)
|
108 |
+
return drawing
|
109 |
|
110 |
title="Image to Line Drawings - Complex and Simple Portraits and Landscapes"
|
111 |
examples=[
|
|
|
122 |
|
123 |
iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'),
|
124 |
gr.inputs.Radio(['Complex Lines','Simple Lines'], type="value", default='Simple Lines', label='version')],
|
125 |
+
gr.outputs.Image(type="pil"), title=title,examples=examples)
|
126 |
|
127 |
+
iface.launch()
|