An AI that generates amazing stories!
- Ravi Maurya 🦉 - [email protected]
- Kush Kothari 😎 - [email protected]
- Shreyas Penkar 🦊 - [email protected]
- Nikheel Indanoor 🦅 - [email protected]
- Mehdi Patel
- Anuj Raghani
- Owais Hetavkar
twAIn is an Artificial Intelligence that can write amazing stories. twAIn is powered by LSTM and GPT-2 Models. It is trained on 20+ famous and compelling novels of various Genres. twAIn can be used as a Web App and a Mobile App.
Give some starting words and twAIn will write an amazing story for you. Currently the genres supported are Adventure, Horror and Mystery. The user has the option to listen, as twAIn reads the story aloud for you. Also there are 45 sample stories preloaded so that you can see the performance of that model.
- GitHub repo link: Link to repository
- Drive link (Demo Video): Drive link here
- Model link: Drive link here
- Front-end - HTML, CSS, Javascript
- Back-end - Python, Flask (Flask is a lightweight WSGI web application framework.)
- Models - LSTM, Open AI's GPT-2
- Mobile App - Flutter
- Clone the repository
git clone https://github.com/kkothari2001/twAIn
- Download the models from here (You can download single genre or all genres)
- After downloading the models, add the models in this path
twAIn/WebApp/checkpoint/<genreNameFolders>
Eg. twAIn/WebApp/checkpoint/adventure
/horror
/mystery
- Now, Install all the python packages from WebApp/requirements.txt in a Virtual Environment.
- Follow All the Instructions of Web First.
- Make sure you have Flutter installed on your PC.
- Go to MobileApp/twain_app and run flutter pub get to install all dependencies.
flutter pub get
- Open file MobileApp/twainapp/lib/utils/settings.dart. In this file set MODE to **_production**, and set IP_ADD to your local IP Address. (So that you can test it locally).
- Install the app on your physical Mobile Device or Emulator.
After setting up for Web and Mobile follow the below instructions to get it running.
- Goto twAIn/WebApp & Execute this to run the Web App
python app.py
- Open localhost:8000/ in your browser to use twAIn.
- Goto twAIn/WebApp & Execute this and keep it running in the background.
python app.py
- Make sure your PC and Mobile is connected on same Wifi Network. (Or your PC is connected to your Mobile's Hotstop) & You can followed the Project Setup for Mobile App above.
- Open the app in your Mobile Phone to use twAIn.
This project generates stories based on the input provided by the user. There are various genres for the user to select which includes Adventure ,Horror,Mystery. It can also convert the generated story into audio.
- Type "help" to get a help-page on your screen.
- Type "sample" to generate a sample story.
- Type "download" to download the generated story as a text file.
The stories to be generated take some time:-
- short story (250 chars) = max 2 mins
- medium story (550 chars) = max 4 mins
- long story (900 chars) = max 6 mins
If you dont wish to wait so much time you can type "sample" and press Enter or click Submit (Web) to get a sample story of that genre and of a specific story length. There are 45 sample stories preloaded and take about 3 seconds to load.
- We could add more genres
- Try to improve our LSTM model to maximize the results for story generation.
- We could also do a model for generating poems and other creative writing templates.
- We could also include a sentimental analysis model which will tell how good a story is (by a small survey we can know the sentiments of a user towards a particular story).