Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def run_prediction(sample, model, processor, mode):
|
|
39 |
do_sample=True,
|
40 |
top_p=0.92,
|
41 |
top_k=5,
|
42 |
-
no_repeat_ngram_size=
|
43 |
num_beams=3,
|
44 |
output_attentions=False,
|
45 |
output_hidden_states=False,
|
@@ -83,7 +83,7 @@ else:
|
|
83 |
st.image(image, caption='Your target document')
|
84 |
|
85 |
with st.spinner(f'Processing the document ...'):
|
86 |
-
pre_trained_model = "unstructuredio/chipper-
|
87 |
processor = DonutProcessor.from_pretrained(pre_trained_model, token=os.environ['HF_TOKEN'])
|
88 |
|
89 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
39 |
do_sample=True,
|
40 |
top_p=0.92,
|
41 |
top_k=5,
|
42 |
+
no_repeat_ngram_size=15,
|
43 |
num_beams=3,
|
44 |
output_attentions=False,
|
45 |
output_hidden_states=False,
|
|
|
83 |
st.image(image, caption='Your target document')
|
84 |
|
85 |
with st.spinner(f'Processing the document ...'):
|
86 |
+
pre_trained_model = "unstructuredio/chipper-v3-preview"
|
87 |
processor = DonutProcessor.from_pretrained(pre_trained_model, token=os.environ['HF_TOKEN'])
|
88 |
|
89 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|