This project aims to serve as the frontend user interface, to run various machine learning models like captiongeneration, cartoonization and textsummarization. The actual deployment of the models is on another service, and this website connects to the service via API protocols. The reason behind separation of the models and the frontend was taken, so as to ease the testing of the frontend, as well as make it easier to add support for newer models later in the future.
To run the service, setup the API service, and edit it's home url in the website_data
file.
Then, create a virtual environment for the website, and install the requirements by running the following command.:
pip install -r requirements.txt
Change the working directory to project
Then, export the following environment variables
export FLASK_APP=application.py
export FLASK_DEBUG=1 # only in case of debugging else set it to 0
export EMAIL_ADDRESS=""
export PASSWORD=""
-
EMAIL_ADDRESS
should be the actual Gmail address from which the email will be sent andPASSWORD
will be the password of the corresponding email address. -
By default the home address is the localhost If we are using an online webserver, then we'd have to replace the localhost with the corresponding home address in the website_data.py file
-
To use the email sender code, we need to allow DisplayUnlockCaptcha and less secure apps
Finally, run the project using:
flask run
- Create an account and create a job
- Upload a single image per job
- The default examples for each task types are shown below
- captiongeneration
- cartoonization
- textsummarization