9prayer commited on
Commit
cfc69c2
·
verified ·
1 Parent(s): 8304c84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = (1, '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; }
 
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; }