Bedtime can be a challenging and frustrating daily experience for children and parents. To address this, we have developed an AI-powered webapp that generates tailored-made stories, that encourage a child through the bedtime transition in a smoothe, engaging and enjoyable way - for everyone!
Utilising artificial intelligence via the OpenAI API, the app will generate a unique story every night; capturing the child's imagination and incorporating their interests to maximise their enjoyment, while prompting children to perform the pre-selected bedtime steps via pop-ups throughout the story. These prompts are tailored to the story, and transform the routine into an exciting adventure, encouraging the child to complete their bedtime task, and ending with them tucked up in bed.
Note : before running for the first time, please go into _init_.py and un-comment line 53
Once you have cloned the repo - make sure that you are in the app
folder, and then type these commands into the terminal (one at a time) :
python -m venv venv
.\\venv\\Scripts\\activate
or : source venv/bin/activate
for Mac / Linux
cd ../
pip install -r requirements.txt
Finally, to run the app :
flask --app app run
or : flask --app app run --debug
to run in debug mode
In the terminal, a link will then appear that looks like this :
Running on http://127.0.0.1:5000
Note : at this point please go into _init_.py and re-comment line 53
Click that link, and our apps homepage will open in a new window in your browser!
- Flask
- Python
- SQLAlchemy
- OpenAI
- HTML and CSS
- Static folder : 'static' elements eg. CSS, images etc
- Templates folder : .html frontend files, routed to in the routes.py file
- Tests Folder : contains tests initialisation, and unit tests for each page incomplete
- init.py : the main code file - generates the app
- forms.py : the forms for creating a new user, selecting story elements, and setting the bedtime routine
- models.py : database model definitions and methods
- openai.py : code for the functionality of the stories generated using the OpenAI API
- routes.py : the routes that map to the html pages above