This is the backend server for the DeepSense app. It uses Flask to serve an API that provides access to machine learning models for emotion detection and for the database files.
-
Clone the repository to your local machine:
git clone https://github.com/chamajay/deepsense-backend.git
-
Download the machine learning models used by the server and put them in the
models/
folderemotion-english-distilroberta-base:
https://huggingface.co/j-hartmann/emotion-english-distilroberta-base
https://drive.google.com/drive/folders/1pcd8XhmnQmAv4uGHfPJ5r12lkk1Rdsng?usp=sharingsuicidal-text-electra-cj: https://drive.google.com/drive/folders/16ZnDr635ODm2t1QV0L9gUcGqHUX2hDiR?usp=sharing
-
Create a virtual environment for the project:
python3 -m venv env source env/bin/activate
-
(Optional) If you're a Linux user you may want to install the pytorch cpu version using following command & comment out the torch, torchaudio and torchvision packages in the requirements.txt before the next step:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
-
Install the required Python packages:
pip install -r requirements.txt
-
Start the server
python app.py