Spaces:
Runtime error
Runtime error
Update app.py
Browse files1 unmodified line2345567810 unmodified lines192021222322232425261 unmodified lineimport cv2import numpy as npfrom tensorflow.keras.models import load_modelfrom transformers import AutoTokenizerfrom transformers import AutoTokenizer, get_tokenizer_config
# Define class names corresponding to your datasetsclass_names = ["Ajloun Castle", "Jeresh", "Petra", "Roman amphitheater", "Umm_Qais", "Wadi_Rum"] # Replace with your actual class names10 unmodified linesvggnet_model = load_model(vggnet_model_path)inceptionv3_model = load_model(inceptionv3_model_path)
# Define the tokenizertokenizer = AutoTokenizer.from_pretrained("YOUR_TRANSFORMER_MODEL_NAME") # Replace with the actual transformer model name# Define the tokenizer (optional for image classification, only needed for text-related tasks)tokenizer = None
# Define the classify_image functiondef classify_image(img, model_choice):app.py+3-3