Currency-Detector / fix_model.py
Bhaskr's picture
Initial commit (fresh start)
8c953f2
raw
history blame contribute delete
703 Bytes
from transformers import AutoImageProcessor
import os
print("--- Starting Fix Generation ---")
try:
# 1. Fetch the correct manual (processor) from the base model
print("Fetching processor from google/efficientnet-v2-s...")
processor = AutoImageProcessor.from_pretrained("google/efficientnet-v2-s")
# 2. Save it locally
save_path = "./fix"
if not os.path.exists(save_path):
os.makedirs(save_path)
processor.save_pretrained(save_path)
print(f"\nSUCCESS! The file 'preprocessor_config.json' is now in the '{save_path}' folder.")
print("\nNext Step: Upload this file to your Hugging Face repository.")
except Exception as e:
print(f"\nERROR: {e}")