Robin Chiu
commited on
Commit
•
5533d5d
1
Parent(s):
e217eec
add log
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def inference(img, det, recog):
|
|
24 |
if recog == 'None':
|
25 |
recog = None
|
26 |
ocr = MMOCR(det=det, recog=recog)
|
27 |
-
print(datetime.datetime.now(), 'start read')
|
28 |
results = ocr.readtext(img.name, details=True, output='output')
|
29 |
result_file = 'output/out_{}.png'.format(os.path.splitext(os.path.basename(img.name))[0])
|
30 |
print(datetime.datetime.now(), results)
|
@@ -90,4 +90,4 @@ gr.Interface(inference,
|
|
90 |
examples=examples,
|
91 |
css=".output_image, .input_image {height: 40rem !important; width: 100% !important;}",
|
92 |
enable_queue=True
|
93 |
-
).launch(debug=True, server_name='0.0.0.0', server_port=7860)
|
|
|
24 |
if recog == 'None':
|
25 |
recog = None
|
26 |
ocr = MMOCR(det=det, recog=recog)
|
27 |
+
print(datetime.datetime.now(), 'start read:', img.name)
|
28 |
results = ocr.readtext(img.name, details=True, output='output')
|
29 |
result_file = 'output/out_{}.png'.format(os.path.splitext(os.path.basename(img.name))[0])
|
30 |
print(datetime.datetime.now(), results)
|
|
|
90 |
examples=examples,
|
91 |
css=".output_image, .input_image {height: 40rem !important; width: 100% !important;}",
|
92 |
enable_queue=True
|
93 |
+
).launch(debug=True, server_name='0.0.0.0', server_port=7860)
|