Spaces:
Runtime error
Runtime error
isLinXu
commited on
Commit
·
bfe7ac7
1
Parent(s):
1b9af07
update app.py
Browse files
app.py
CHANGED
@@ -186,8 +186,9 @@ if __name__ == '__main__':
|
|
186 |
det_weights = gr.inputs.Textbox(default=None)
|
187 |
rec = gr.inputs.Dropdown(label="Text Recognition Model", choices=[m for m in textrec_model_list], default='CRNN')
|
188 |
rec_weights = gr.inputs.Textbox(default=None)
|
189 |
-
kie = gr.inputs.
|
190 |
-
|
|
|
191 |
kie_weights = gr.inputs.Textbox(default=None)
|
192 |
device = gr.inputs.Radio(choices=["cpu", "cuda"], label="Device used for inference", default="cpu")
|
193 |
batch_size = gr.inputs.Number(default=1, label="Inference batch size")
|
@@ -215,7 +216,7 @@ if __name__ == '__main__':
|
|
215 |
input_image, out_dir, det, det_weights, rec, rec_weights,
|
216 |
kie, kie_weights, device, batch_size
|
217 |
],
|
218 |
-
outputs=[output_image, output_json],
|
219 |
title=title, description=description, article=article,
|
220 |
)
|
221 |
|
|
|
186 |
det_weights = gr.inputs.Textbox(default=None)
|
187 |
rec = gr.inputs.Dropdown(label="Text Recognition Model", choices=[m for m in textrec_model_list], default='CRNN')
|
188 |
rec_weights = gr.inputs.Textbox(default=None)
|
189 |
+
kie = gr.inputs.Textbox(default='SDMGR')
|
190 |
+
# kie = gr.inputs.Dropdown(label="Key Information Extraction Model", choices=[m for m in textkie_model_list],
|
191 |
+
# default='SDMGR')
|
192 |
kie_weights = gr.inputs.Textbox(default=None)
|
193 |
device = gr.inputs.Radio(choices=["cpu", "cuda"], label="Device used for inference", default="cpu")
|
194 |
batch_size = gr.inputs.Number(default=1, label="Inference batch size")
|
|
|
216 |
input_image, out_dir, det, det_weights, rec, rec_weights,
|
217 |
kie, kie_weights, device, batch_size
|
218 |
],
|
219 |
+
outputs=[output_image, output_json], examples=examples,
|
220 |
title=title, description=description, article=article,
|
221 |
)
|
222 |
|