Update app.py
Browse files
app.py
CHANGED
|
@@ -16,13 +16,13 @@ def process(img_path):
|
|
| 16 |
for (bbox, text, prob) in results:
|
| 17 |
p0, p1, p2, p3 = bbox
|
| 18 |
draw.line([*p0, *p1, *p2, *p3, *p0], fill = 'yellow', width = 2)
|
| 19 |
-
returns.append(text)
|
| 20 |
return [pim, returns]
|
| 21 |
|
| 22 |
title = '车架号识别展示'
|
| 23 |
description = '拖拽图片到识别区开始分析'
|
| 24 |
ip = gr.Image(sources = ['upload'], label = '上传图片', width = '100%', height = '40rem', type = 'filepath')
|
| 25 |
-
op = [gr.Image(sources = None, label = '处理结果', width = '100%', height = '40rem', type = 'pil'), gr.Dataframe(col_count = (
|
| 26 |
css = """
|
| 27 |
table.svelte-y11bhb.svelte-y11bhb { max-width: 100%; overflow-x: hidden; }
|
| 28 |
thead.svelte-y11bhb.svelte-y11bhb { visibility: hidden; }
|
|
|
|
| 16 |
for (bbox, text, prob) in results:
|
| 17 |
p0, p1, p2, p3 = bbox
|
| 18 |
draw.line([*p0, *p1, *p2, *p3, *p0], fill = 'yellow', width = 2)
|
| 19 |
+
returns.append(text, prob)
|
| 20 |
return [pim, returns]
|
| 21 |
|
| 22 |
title = '车架号识别展示'
|
| 23 |
description = '拖拽图片到识别区开始分析'
|
| 24 |
ip = gr.Image(sources = ['upload'], label = '上传图片', width = '100%', height = '40rem', type = 'filepath')
|
| 25 |
+
op = [gr.Image(sources = None, label = '处理结果', width = '100%', height = '40rem', type = 'pil'), gr.Dataframe(col_count = (2, 'fixed'), show_label = False)]
|
| 26 |
css = """
|
| 27 |
table.svelte-y11bhb.svelte-y11bhb { max-width: 100%; overflow-x: hidden; }
|
| 28 |
thead.svelte-y11bhb.svelte-y11bhb { visibility: hidden; }
|