kfahn commited on
Commit
22b802a
1 Parent(s): f9c4d9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -95,8 +95,8 @@ model3.eval()
95
  # model2.load_state_dict(torch.load('model2.pth', map_location=torch.device('cpu')))
96
  # model2.eval()
97
 
98
- def predict(input_img):
99
- input_img = Image.open(input_img, ver)
100
  transform = transforms.Compose([transforms.Resize(256, Image.BICUBIC), transforms.ToTensor()])
101
  input_img = transform(input_img)
102
  input_img = torch.unsqueeze(input_img, 0)
@@ -123,7 +123,7 @@ title="Image to Coloring Page Generator"
123
 
124
 
125
  iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'),
126
- gr.inputs.Radio(['Complex Lines'], type="value", default='Complex Lines', label='version')],
127
  gr.outputs.Image(type="pil"))
128
 
129
  iface.launch()
 
95
  # model2.load_state_dict(torch.load('model2.pth', map_location=torch.device('cpu')))
96
  # model2.eval()
97
 
98
+ def predict(input_img, ver):
99
+ input_img = Image.open(input_img)
100
  transform = transforms.Compose([transforms.Resize(256, Image.BICUBIC), transforms.ToTensor()])
101
  input_img = transform(input_img)
102
  input_img = torch.unsqueeze(input_img, 0)
 
123
 
124
 
125
  iface = gr.Interface(predict, [gr.inputs.Image(type='filepath'),
126
+ gr.inputs.Radio(['Complex Lines','Simple Lines'], type="value", default='Complex Lines', label='version')],
127
  gr.outputs.Image(type="pil"))
128
 
129
  iface.launch()