app/
: Contains the Flask application code__init__.py
: Flask application factorymain.py
: Main Flask blueprint and routesmodel.py
: Intent classification model class
data/
: Contains the customer feedback datafeedback.xlsx
: Excel file with customer feedback
models/
: Contains the trained model artifactstfidf_vectorizer.pkl
: Trained TF-IDF vectorizerintent_classifier.pkl
: Trained intent classifierlabel_binarizer.pkl
: Label binarizer for intents
train_model.py
: Script to train the intent prediction modelrun.py
: Entry point to run the Flask applicationrequirements.txt
: List of required Python packagesREADME.md
: Project documentation
-
Create a new conda environment and install dependencies:
conda create -n novo_assignment python=3.9 conda activate novo_assignment pip install -r requirements.txt
-
Train the model (if not already done):
python train_model.py
-
Run the Flask application:
python run.py
-
Use the
/predict
endpoint to predict intents for customer feedback.
- Ensure
feedback.xlsx
is placed in thedata/
directory. - The model files (
tfidf_vectorizer.pkl
,intent_classifier.pkl
,label_binarizer.pkl
) should be in themodels/
directory.
- Evaluate the model using standard metrics like accuracy, precision, recall, and F1-score.
- Use a hold-out validation set or cross-validation for reliable performance estimates.
- Collect new labeled data for the new intents.
- Retrain the model using the updated dataset.
- Save the updated model artifacts to the
models/
directory.
=======