Spaces:
Build error
Build error
yangwu
commited on
Commit
•
93cb1ad
1
Parent(s):
50ecfe2
update
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ transform_pil = transforms.Compose([
|
|
18 |
])
|
19 |
|
20 |
|
21 |
-
def
|
22 |
print(f_path)
|
23 |
|
24 |
results = dict(img_info=dict(filename=f_path, ann=dict(seg_map='None')))
|
@@ -78,7 +78,7 @@ if __name__ == '__main__':
|
|
78 |
pipelines = Compose(cfg.data.val[0].pipeline)
|
79 |
|
80 |
iface = gr.Interface(
|
81 |
-
|
82 |
inputs=gr.inputs.Image(label="Upload image to detect", type="filepath"),
|
83 |
# outputs=['text', 'image'],
|
84 |
outputs=[gr.outputs.Textbox(type="text", label="image forgery score"),
|
|
|
18 |
])
|
19 |
|
20 |
|
21 |
+
def inference_api(f_path):
|
22 |
print(f_path)
|
23 |
|
24 |
results = dict(img_info=dict(filename=f_path, ann=dict(seg_map='None')))
|
|
|
78 |
pipelines = Compose(cfg.data.val[0].pipeline)
|
79 |
|
80 |
iface = gr.Interface(
|
81 |
+
inference_api,
|
82 |
inputs=gr.inputs.Image(label="Upload image to detect", type="filepath"),
|
83 |
# outputs=['text', 'image'],
|
84 |
outputs=[gr.outputs.Textbox(type="text", label="image forgery score"),
|