TusharGoel commited on
Commit
ddf6145
1 Parent(s): af50898

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -2,10 +2,12 @@ import gradio as gr
2
  from transformers import AutoModelForQuestionAnswering, AutoTokenizer, LayoutLMv3ImageProcessor
3
 
4
  model_name = "TusharGoel/LiLT-Document-QA"
5
- tokenizer = AutoTokenizer.from_pretrained(model_name, apply_ocr = True, revision="3d488d3d0b11abbe0d4ee5b44e7478861cf3a072")
 
 
6
  image_processor = LayoutLMv3ImageProcessor()
7
 
8
- model = AutoModelForQuestionAnswering.from_pretrained(model_name, revision="3d488d3d0b11abbe0d4ee5b44e7478861cf3a072")
9
  model.eval()
10
 
11
  def qna(image, question):
 
2
  from transformers import AutoModelForQuestionAnswering, AutoTokenizer, LayoutLMv3ImageProcessor
3
 
4
  model_name = "TusharGoel/LiLT-Document-QA"
5
+
6
+ revision = "fb6477b7468de3850b0ad8a9249143958aa8fdf6"
7
+ tokenizer = AutoTokenizer.from_pretrained(model_name, apply_ocr = True, revision=revision)
8
  image_processor = LayoutLMv3ImageProcessor()
9
 
10
+ model = AutoModelForQuestionAnswering.from_pretrained(model_name, revision=revision)
11
  model.eval()
12
 
13
  def qna(image, question):