Skip to content

Commit

Permalink
Add model to appropriate place in toctree
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels Rogge authored and Niels Rogge committed Aug 12, 2022
1 parent 34c9f38 commit 397cb63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/en/_toctree.yml
Expand Up @@ -218,8 +218,6 @@
title: DialoGPT
- local: model_doc/distilbert
title: DistilBERT
- local: model_doc/donut
title: Donut
- local: model_doc/dpr
title: DPR
- local: model_doc/electra
Expand Down Expand Up @@ -429,6 +427,8 @@
title: CLIP
- local: model_doc/data2vec
title: Data2Vec
- local: model_doc/donut
title: Donut
- local: model_doc/flava
title: FLAVA
- local: model_doc/groupvit
Expand Down
7 changes: 7 additions & 0 deletions src/transformers/models/donut/convert_donut_to_pytorch.py
Expand Up @@ -164,8 +164,15 @@ def convert_donut_checkpoint(model_name, pytorch_dump_folder_path=None, push_to_
task_prompt = task_prompt.replace("{user_input}", question)
elif model_name == "naver-clova-ix/donut-base-finetuned-rvlcdip":
task_prompt = "<s_rvlcdip>"
elif model_name in [
"naver-clova-ix/donut-base-finetuned-cord-v1",
"naver-clova-ix/donut-base-finetuned-cord-v1-2560",
]:
task_prompt = "<s_cord>"
elif model_name == "naver-clova-ix/donut-base-finetuned-cord-v2":
task_prompt = "s_cord-v2>"
elif model_name == "naver-clova-ix/donut-base-finetuned-zhtrainticket":
task_prompt = "<s_zhtrainticket>"
elif model_name in ["naver-clova-ix/donut-proto", "naver-clova-ix/donut-base"]:
# use a random prompt
task_prompt = "hello world"
Expand Down

0 comments on commit 397cb63

Please sign in to comment.