rishab1090 commited on
Commit
c999abd
·
verified ·
1 Parent(s): 84a841a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -8,7 +8,13 @@ import io
8
  app = FastAPI()
9
 
10
  # Load your model
11
- model = tf.keras.models.load_model("models/2.keras")
 
 
 
 
 
 
12
 
13
  CLASS_NAMES = ['Fungi', 'Healthy', 'Nematode', 'Pest', 'Phytopthora', 'Virus']
14
 
 
8
  app = FastAPI()
9
 
10
  # Load your model
11
+ model_path = "models/2.keras"
12
+
13
+ # Change file permission manually before loading (if needed)
14
+ os.chmod(model_path, 0o644) # Read/write for owner, read-only for others
15
+
16
+ # Now load the model
17
+ model = tf.keras.models.load_model(model_path)
18
 
19
  CLASS_NAMES = ['Fungi', 'Healthy', 'Nematode', 'Pest', 'Phytopthora', 'Virus']
20