andgrt commited on
Commit
c61a50f
·
1 Parent(s): c8dc60c

fix: gr.Audio params

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,10 +10,10 @@ import torch
10
  import numpy as np
11
 
12
  processor = AutoProcessor.from_pretrained(
13
- "andgrt/layoutlmv2-base-uncased_finetuned_docvqa"
14
  )
15
  model = AutoModelForDocumentQuestionAnswering.from_pretrained(
16
- "andgrt/layoutlmv2-base-uncased_finetuned_docvqa"
17
  )
18
 
19
  tokenizer_ru2en = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-ru-en")
@@ -92,7 +92,7 @@ interface = gr.Interface(
92
  inputs=[
93
  gr.Image(type="pil"),
94
  gr.Textbox(label="Вопрос (на русском)", placeholder="Ваш вопрос"),
95
- gr.Audio(source="microphone", streaming=True, label="Голосовой ввод"),
96
  ],
97
  outputs=gr.Textbox(label="Ответ (на русском)"),
98
  examples=[["doc.png", "О чем данный документ?"]],
 
10
  import numpy as np
11
 
12
  processor = AutoProcessor.from_pretrained(
13
+ "MariaK/layoutlmv2-base-uncased_finetuned_docvqa_v2"
14
  )
15
  model = AutoModelForDocumentQuestionAnswering.from_pretrained(
16
+ "MariaK/layoutlmv2-base-uncased_finetuned_docvqa_v2"
17
  )
18
 
19
  tokenizer_ru2en = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-ru-en")
 
92
  inputs=[
93
  gr.Image(type="pil"),
94
  gr.Textbox(label="Вопрос (на русском)", placeholder="Ваш вопрос"),
95
+ gr.Audio(sources="microphone", streaming=True, label="Голосовой ввод"),
96
  ],
97
  outputs=gr.Textbox(label="Ответ (на русском)"),
98
  examples=[["doc.png", "О чем данный документ?"]],