Add some TODOs + localhost to allowed_hosts

This commit is contained in:
Maciej Pęśko 2018-09-02 18:23:39 +02:00
parent e96ddeb49e
commit 354b07cc98
3 changed files with 11 additions and 2 deletions

View file

@ -1 +1,9 @@
# comixify
# comixify
#TODO:
- [ ] Prepare readme
- [ ] Fix model loading to memory
- [ ] Replace ffmpeg with some keyframes extractor
- [ ] Prepare own ComixGAN
- [ ] Prepare some more intelligent method for comic layout
- [ ] Prepare some method for voice extraction

View file

@ -25,7 +25,7 @@ SECRET_KEY = 'secret_123'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['35.241.250.34', 'comixify.ii.pw.edu.pl']
ALLOWED_HOSTS = ['35.241.250.34', 'comixify.ii.pw.edu.pl', 'localhost', '127.0.0.1']
# Application definition

View file

@ -21,6 +21,7 @@ class StyleTransfer():
style = kwargs.get("style", "Hayao")
resize = kwargs.get("resize", 450)
# TODO: We should load model to memory right after deployment, not on each request.
# load pretrained model
model = Transformer()
model.load_state_dict(torch.load(os.path.join("CartoonGAN/pretrained_model", style + "_net_G_float.pth")))