food-api / fix_config.py
Ajay Singh Rathore
Fix: Update model name to working repository
c108159
raw
history blame contribute delete
451 Bytes
from transformers import AutoConfig
# The base model you originally fine-tuned from
BASE_MODEL = "Mullerjo/food-101-finetuned-model"
SAVE_DIRECTORY = "./fixed-model-config"
print(f"Loading the correct config from '{BASE_MODEL}'...")
config = AutoConfig.from_pretrained(BASE_MODEL)
print(f"Saving the correct config file to '{SAVE_DIRECTORY}'...")
config.save_pretrained(SAVE_DIRECTORY)
print("\nSuccess! A correct 'config.json' has been created.")