Features include:
- Return the vocabulary of sponsorship keywords
- Add a new keyword to the vocabulary
- Predict if the given text is sponsored or not
- Bonus: Store the vocabulary in a databse
- Bonus: Provide a dockerfile to run the code
- Django 3.1.2
- Python 3.8.5
- SQLite3
- Docker
- Open terminal and run docker-compose file to build and run the application:
Note: During the first run, build may take up to 5 minutes to finish
docker-compose up --build
- Open terminal and create the environment:
conda env create -f env-windows.yml - Acitvate conda environment:
conda activate linqia_oa - Run the Django application:
python manage.py runserver
- File -> Import -> Upload Files
- Select postman_requests.json
(GET) Vocabulary
- Description: Return the vocabulary of sponsorship keywords
- Endpoint: /api/vocab
(POST) Vocabulary
- Description: Add a new keyword to the vocabulary
- Endpoint: /api/vocab
(POST) Prediction
- Description: Predict if the given text is sponsored or not
- Endpoint: /api/prediction