Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import torch
|
4 |
from transformers import UdopProcessor, UdopForConditionalGeneration
|
5 |
|
6 |
-
repo_id = "
|
7 |
|
8 |
processor = UdopProcessor.from_pretrained(repo_id)
|
9 |
model = UdopForConditionalGeneration.from_pretrained(repo_id)
|
@@ -17,7 +17,7 @@ def process_document(image, question):
|
|
17 |
|
18 |
return generated_text
|
19 |
|
20 |
-
description = "
|
21 |
article = "<p style='text-align: center'><a href='https://arxiv.org/pdf/2212.02623.pdf' target='_blank'>Unifying Vision, Text, and Layout for Universal Document Processing</a> | <a href='https://github.com/microsoft/UDOP' target='_blank'>Github Repo</a></p>"
|
22 |
|
23 |
demo = gr.Interface(
|
|
|
3 |
import torch
|
4 |
from transformers import UdopProcessor, UdopForConditionalGeneration
|
5 |
|
6 |
+
repo_id = "jinhybr/Fine-tune-UDOP-CDIP"
|
7 |
|
8 |
processor = UdopProcessor.from_pretrained(repo_id)
|
9 |
model = UdopForConditionalGeneration.from_pretrained(repo_id)
|
|
|
17 |
|
18 |
return generated_text
|
19 |
|
20 |
+
description = "UDOP for DocVQA (document visual question answering). To use it, simply upload your image and type a question and click 'submit', or click one of the examples to load them. Read more at the links below."
|
21 |
article = "<p style='text-align: center'><a href='https://arxiv.org/pdf/2212.02623.pdf' target='_blank'>Unifying Vision, Text, and Layout for Universal Document Processing</a> | <a href='https://github.com/microsoft/UDOP' target='_blank'>Github Repo</a></p>"
|
22 |
|
23 |
demo = gr.Interface(
|