Django website with ML model for Sentiment Analysis
- Clone the repository
- Install the requirements
pipenv install
pipenv shell
- Run the server
python manage.py runserver
- Open the browser and go to http://127.0.0.1:8000/
- Enter the text in the text area.
- Click on the "Analyze".
- Install docker: https://docs.docker.com/engine/install/ubuntu/
- Download image:
docker pull docker pull ghcr.io/almazkun/sentimental:latest
- Create and populate the .env file:
touch .env
echo "DJANGO_SECRET_KEY=your_secret_key" >> .env
echo "DJANGO_DEBUG=your_debug" >> .env
echo "DJANGO_ALLOWED_HOSTS=localhost" >> .env
echo "DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost:8000" >> .env
echo "SENTIMENT_MODEL_PATH=./model.pkl" >> .env
- Run the container:
docker run --rm -d -p 80:8000 -env-file .env ghcr.io/almazkun/sentimental:latest
- Open the browser and go to http://localhost/