Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ pretrained_revision = 'main'
|
|
12 |
# use 'main' for latest revision
|
13 |
print(f"Loading model checkpoint: {pretrained_repo_name}")
|
14 |
|
15 |
-
processor = DonutProcessor.from_pretrained(pretrained_repo_name, revision=pretrained_revision)
|
16 |
-
model = VisionEncoderDecoderModel.from_pretrained(pretrained_repo_name, revision=pretrained_revision)
|
17 |
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
model.to(device)
|
|
|
12 |
# use 'main' for latest revision
|
13 |
print(f"Loading model checkpoint: {pretrained_repo_name}")
|
14 |
|
15 |
+
processor = DonutProcessor.from_pretrained(pretrained_repo_name, revision=pretrained_revision, use_auth_token="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")
|
16 |
+
model = VisionEncoderDecoderModel.from_pretrained(pretrained_repo_name, use_auth_token="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", revision=pretrained_revision)
|
17 |
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
model.to(device)
|