nickgambirasi commited on
Commit
30b460c
1 Parent(s): c211276

update app

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,13 +40,13 @@ def process_document(image):
40
  sequence = sequence.replace(processor.tokenizer.eos_token, "").replace(processor.tokenizer.pad_token, "")
41
  sequence = re.sub(r"<.*?>", "", sequence).strip() # remove first task start token
42
 
43
- return sequence
44
 
45
  demo = gradio.Interface(
46
  fn=process_document,
47
  inputs="image",
48
- outputs="string",
49
- title="Document Parsing Demo",
50
  description=None,
51
  article=None,
52
  examples=None,
 
40
  sequence = sequence.replace(processor.tokenizer.eos_token, "").replace(processor.tokenizer.pad_token, "")
41
  sequence = re.sub(r"<.*?>", "", sequence).strip() # remove first task start token
42
 
43
+ return {'output': sequence}
44
 
45
  demo = gradio.Interface(
46
  fn=process_document,
47
  inputs="image",
48
+ outputs="json",
49
+ title="Donut Text Parsing",
50
  description=None,
51
  article=None,
52
  examples=None,