$ pip install -r requirements.txt
$ python manage.py runserver
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser --email [email protected] --username admin
More APIs Information:
Or
- Import Chatbot.postman_collection.json to Postman
APIs | Method | Urls |
---|---|---|
Register | POST | http://127.0.0.1:8000/user/register/ |
Login | POST | http://127.0.0.1:8000/user/login/ |
APIs | Method | Urls |
---|---|---|
Web hook | POST | http://127.0.0.1:8000/chatbot/webhook/ |
APIs | Method | Urls |
---|---|---|
News Analysis By Text | POST | http://127.0.0.1:8000/api/checknews/ |
News Analysis By URL | POST | http://127.0.0.1:8000/api/checknewsbyurl/ |
Check News Detail By URL | POST | http://127.0.0.1:8000/api/newsinfo/ |
APIs | Method | Urls |
---|---|---|
Create News | POST | http://127.0.0.1:8000/api/news/ |
Get All News | GET | http://127.0.0.1:8000/api/news/ |
Get News By ID | GET | http://127.0.0.1:8000/api/news/:news_id/ |
Update News | PUT | http://127.0.0.1:8000/api/news/:news_id/ |
Delete News | DELETE | http://127.0.0.1:8000/api/news/:news_id/ |
APIs | Method | Urls |
---|---|---|
Create Record | POST | http://127.0.0.1:8000/api/record/ |
Get All Record | GET | http://127.0.0.1:8000/api/record/ |
Get Record By ID | GET | http://127.0.0.1:8000/api/record/:record_id/ |
Update Record | PUT | http://127.0.0.1:8000/api/record/:record_id/ |
Delete Record | DELETE | http://127.0.0.1:8000/api/record/:record_id/ |
$ python model_training/ModelTrain.py
$ python model_training/ModelEvaluate.py
$ python model_training/ModelTest.py
- Download the news dataset from dashboard (heroku)
- Rename the csv file to "UP" + timestamp
- Put the file to input_labelled_news folder
- Run the follow code
$ python model_training/ModelUpdate.py
$ heroku login
$ heroku logs -t -a news-analysis-chatbot
$ heroku run python manage.py migrate -a news-analysis-chatbot
$ pip freeze > requirements.txt