SWHL commited on
Commit
0f0d74c
·
1 Parent(s): 4c611ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -81,8 +81,7 @@ class PaperEdge(object):
81
  return save_path
82
 
83
 
84
- def inference(img):
85
- img_path = img.name
86
  save_img_path = paper_edge(img_path)
87
  return save_img_path
88
 
@@ -103,9 +102,9 @@ css = ".output_image, .input_image {height: 40rem !important; width: 100% !impor
103
 
104
  gr.Interface(
105
  inference,
106
- inputs=gr.inputs.Image(type='file', label='Input'),
107
  outputs=[
108
- gr.outputs.Image(type='file', label='Output_image'),
109
  ],
110
  title=title,
111
  description=description,
 
81
  return save_path
82
 
83
 
84
+ def inference(img_path):
 
85
  save_img_path = paper_edge(img_path)
86
  return save_img_path
87
 
 
102
 
103
  gr.Interface(
104
  inference,
105
+ inputs=gr.inputs.Image(type='filepath', label='Input'),
106
  outputs=[
107
+ gr.outputs.Image(type='filepath', label='Output_image'),
108
  ],
109
  title=title,
110
  description=description,