removed xgboost training
Browse files
app.py
CHANGED
@@ -48,16 +48,16 @@ tokenizer_model_name = "nlptown/bert-base-multilingual-uncased-sentiment"
|
|
48 |
mental_classifier_model_path = "mental_health_model.pkl"
|
49 |
mental_classifier = MentalHealthClassifier(data_path, mental_classifier_model_path)
|
50 |
|
51 |
-
if not os.path.exists(mental_classifier_model_path):
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
else:
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
# Function to display Q-table
|
63 |
def display_q_table(q_values, states, actions):
|
|
|
48 |
mental_classifier_model_path = "mental_health_model.pkl"
|
49 |
mental_classifier = MentalHealthClassifier(data_path, mental_classifier_model_path)
|
50 |
|
51 |
+
# if not os.path.exists(mental_classifier_model_path):
|
52 |
+
# mental_classifier.initialize_tokenizer(tokenizer_model_name)
|
53 |
+
# X, y = mental_classifier.preprocess_data()
|
54 |
+
# y_test, y_pred = mental_classifier.train_model(X, y)
|
55 |
+
# mental_classifier.save_model()
|
56 |
+
# else:
|
57 |
+
# mental_classifier.load_model()
|
58 |
+
# mental_classifier.initialize_tokenizer(tokenizer_model_name) # Ensure tokenizer is initialized if loading model from pickle
|
59 |
+
# X, y = mental_classifier.preprocess_data() # Preprocess data again if needed
|
60 |
+
# mental_classifier.model.fit(X, y) # Fit the loaded model to the data
|
61 |
|
62 |
# Function to display Q-table
|
63 |
def display_q_table(q_values, states, actions):
|