subbunanepalli commited on
Commit
a933cfb
·
verified ·
1 Parent(s): e2a836d

Create validate.py

Browse files
Files changed (1) hide show
  1. validate.py +12 -0
validate.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from config import MODEL_PATH, TFIDF_PATH
3
+
4
+ def validate_files():
5
+ model_exists = os.path.exists(MODEL_PATH)
6
+ vectorizer_exists = os.path.exists(TFIDF_PATH)
7
+
8
+ return {
9
+ "model_found": model_exists,
10
+ "vectorizer_found": vectorizer_exists,
11
+ "status": "Ready" if model_exists and vectorizer_exists else "Missing files"
12
+ }