Predict allows you to simply text a person's first name to a Twilio number and get back their gender i.e Male or Female
- Web --> https://twilio-predict.herokuapp.com/predict/michelle
- SMS --> https://twilio-predict.herokuapp.com/hook
- Python 3.7 or later
- FastAPI
- scikit-learn
- Jupyter Notebook
- A Twilio account - sign up
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.template .env
code .env
Before we begin, we need to collect all the config values we need to run the application:
Config Value | Description |
---|---|
Account Sid | Your primary Twilio account identifier - find this in the Console. |
Auth Token | Used to authenticate - just like the above, you'll find this here. |
Phone number | A Twilio phone number in E.164 format - you can get one here |
See Twilio Account Settings to locate the necessary environment variables.
- Run the application
uvicorn app:app --reload
- Navigate to http://localhost:8000
That's it!
You can run the tests locally by typing:
cd genclf
py.test
Additionally to trying out this application locally, you can deploy it to a variety of host services. Here is a small selection of them.
Please be aware that some of these might charge you for the usage or might make the source code for this application visible to the public. When in doubt research the respective hosting service first.
Service | |
---|---|
Heroku | |
Glitch | |
Zeit |
- GitHub's repository template functionality
This template is open source and welcomes contributions. All contributions are subject to our Code of Conduct.
No warranty expressed or implied. Software is as is.
© Copyright 2020 Fodé Diop