Neil Saunders commited on
Commit
3464fc9
·
1 Parent(s): bd4b429

Fix gradio api

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -104,7 +104,7 @@ def predict(input_img, ver):
104
  drawing = model2(input_img)[0].detach()
105
  else:
106
  drawing = model1(input_img)[0].detach()
107
-
108
  drawing = transforms.ToPILImage()(drawing)
109
  return drawing
110
 
@@ -114,8 +114,8 @@ description="Gradio Demo for line drawing generation. "
114
  examples=[['cat.png', 'style 1'], ['bridge.png', 'style 1'], ['lizard.png', 'style 2'],]
115
 
116
 
117
- iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'),
118
- gr.inputs.Radio(['style 1','style 2'], type="value", default='style 1', label='version')],
119
- gr.outputs.Image(type="pil"), title=title,description=description,examples=examples)
120
 
121
  iface.launch()
 
104
  drawing = model2(input_img)[0].detach()
105
  else:
106
  drawing = model1(input_img)[0].detach()
107
+
108
  drawing = transforms.ToPILImage()(drawing)
109
  return drawing
110
 
 
114
  examples=[['cat.png', 'style 1'], ['bridge.png', 'style 1'], ['lizard.png', 'style 2'],]
115
 
116
 
117
+ iface = gr.Interface(predict, [gr.Image(type='filepath'),
118
+ gr.Radio(['style 1','style 2'], type="value", default='style 1', label='version')],
119
+ gr.Image(type="pil"), title=title,description=description,examples=examples)
120
 
121
  iface.launch()