From d52204c2f5399e86c22a4823d7d2d66d4b863694 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Tue, 22 Jul 2025 14:48:23 +0530 Subject: [PATCH] Commented local_model_path variable since it's no longer needed. --- models/app.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/models/app.py b/models/app.py index bc09202..5ec1edc 100644 --- a/models/app.py +++ b/models/app.py @@ -5,14 +5,13 @@ from transformers import ViTImageProcessor, ViTForImageClassification import sys # Specify the local directory where the model files are stored -local_model_path = '/home/overnion/Status200/models/pretrained' +#local_model_path = './pretrained' # Check if the image path is provided if len(sys.argv) < 2: print("Error: No image path provided. Please provide the path to the image as an argument.") exit() - # Load the image processor and model model_name = 'vishnun0027/Crop_Disease_model_1' image_processor = ViTImageProcessor.from_pretrained(model_name) @@ -48,4 +47,3 @@ predicted_class_idx = logits.argmax(-1).item() # Print the predicted class print(model.config.id2label[predicted_class_idx]) -