UnboundLocalError: local variable 'image_processor_class' referenced before assignment
### System Info

- `transformers` version: 4.26.0.dev0
- Platform: Linux-4.18.0-425.3.1.el8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.12.0
- PyTorch version (GPU?): 1.13.1 (False)
- Tensorflow version (GPU?): 2.11.0 (False)
- Flax version (CPU?/GPU?/TPU?): 0.5.3 (cpu)
- Jax version: 0.3.6
- JaxLib version: 0.3.5
- Using GPU in script?: False
- Using distributed or parallel set-up in script?: False

### Who can help?

@sgugger 

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

When I try to add a new model as per the tutorial [here](https://huggingface.co/docs/transformers/add_new_model), I get the following error with the given set of inputs:

```
$ transformers-cli add-new-model-like
What is the model you would like to duplicate? Please provide the lowercase `model_type` (e.g. roberta): roberta
What is the name (with no special casing) for your new model in the paper (e.g. RoBERTa)? NewTransformer
What identifier would you like to use for the `model_type` of this model?  [newtransformer] 
What lowercase name would you like to use for the module (folder) of this model?  [newtransformer] 
What prefix (camel-cased) would you like to use for the model classes of this model (e.g. Roberta)?  [NewTransformer] 
What prefix (upper-cased) would you like to use for the constants relative to this model?  [NEWTRANSFORMER] 
What will be the name of the config class for this model?  [NewTransformerConfig] 
Please give a checkpoint identifier (on the model Hub) for this new model (e.g. facebook/roberta-base): 
Will your new model use the same processing class as roberta (RobertaTokenizer) (yes/no)? no
What will be the name of the tokenizer class for this model?  [NewTransformerTokenizer] 
Traceback (most recent call last):
  File "/home/stuli/.conda/envs/bin/transformers-cli", line 8, in <module>
    sys.exit(main())
  File "/scratch/gpfs/stuli/transformers/src/transformers/commands/transformers_cli.py", line 54, in main
    service = args.func(args)
  File "/scratch/gpfs/stuli/transformers/src/transformers/commands/add_new_model_like.py", line 1351, in add_new_model_like_command_factory
    return AddNewModelLikeCommand(config_file=args.config_file, path_to_repo=args.path_to_repo)
  File "/scratch/gpfs/stuli/transformers/src/transformers/commands/add_new_model_like.py", line 1382, in __init__
    ) = get_user_input()
  File "/scratch/gpfs/stuli/transformers/src/transformers/commands/add_new_model_like.py", line 1583, in get_user_input
    image_processor_class=image_processor_class,
UnboundLocalError: local variable 'image_processor_class' referenced before assignment
```

### Expected behavior

There should be no error with the given sequence of inputs when creating a new model. 