Creating unique art using A.I.
This web app uses https://docs.floydhub.com/examples/style_transfer/ for the style transfer algorithm, and floydhub has a service to host the model as a REST API.
Once you clone this repository there are a few steps to getting everything to work.
-
You need to have a floydhub account, it is free and you can use up to 2 hours of GPU and 20 hours of CPU for free. https://www.floydhub.com
-
You are going to want to create a virtual environment. https://virtualenv.pypa.io/en/stable/
-
now install all of the requirements with: pip install -r requirements.txt
-
At this point you will need to init the folder with floydhub using floyd init fast-style-transfer
-
Now you can serve the model using: floyd run --env tensorflow-0.12:py2 --data narenst/datasets/neural-style-transfer-pre-trained-models/1:input --mode serve
-
- will give the the endpoint, you will need this when completing the form. You can either put it in the code for the endpoint variable in routes.py or use the endpoint part of the form.
-
Now you can run: python routes.py
This is start the webapp on the local host.
-
Now you can fill out the form and use the endpoint that was given when you served the model. And you will now be able to test out creating new art!
-
Remember after you are done to turn off the served model under jobs in your floydhub account, then when you want to use it again, you serve it again and use the new endpoint.
Code reviewed
Acceptance criteria met
Functional Tests passed
Non-Functional requirements met
Product Owner accepts the User Story
Python: https://www.python.org/dev/peps/pep-0008/
HTML: https://www.w3schools.com/html/html5_syntax.asp