Spaces:
Runtime error
Runtime error
feat: donut common-crawl mid
Browse files
app.py
CHANGED
|
@@ -84,8 +84,8 @@ if st.button('Parse sample! π'):
|
|
| 84 |
image = Image.open('./target_image.jpg')
|
| 85 |
with st.spinner(f'baking the π©s...'):
|
| 86 |
if information == 'Base Common-Crawl π©':
|
| 87 |
-
processor = DonutProcessor.from_pretrained("laverdes/donut-commoncrawl")
|
| 88 |
-
pretrained_model = VisionEncoderDecoderModel.from_pretrained("laverdes/donut-commoncrawl")
|
| 89 |
task_prompt = f"<s>"
|
| 90 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 91 |
pretrained_model.to(device)
|
|
|
|
| 84 |
image = Image.open('./target_image.jpg')
|
| 85 |
with st.spinner(f'baking the π©s...'):
|
| 86 |
if information == 'Base Common-Crawl π©':
|
| 87 |
+
processor = DonutProcessor.from_pretrained("laverdes/donut-commoncrawl-mid") # laverdes/donut-commoncrawl
|
| 88 |
+
pretrained_model = VisionEncoderDecoderModel.from_pretrained("laverdes/donut-commoncrawl-mid") # laverdes/donut-commoncrawl
|
| 89 |
task_prompt = f"<s>"
|
| 90 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 91 |
pretrained_model.to(device)
|