Django website with ML model for Sentiment Analysis
https://sentiment.akun.dev
- 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