Question: how to use python scripts for web?

4

I want to make a web application that will read colors in RGB of logos and create suggestions of color scales for websites.

The algorithm will be in python using OpenCV.

The client uploads the image > the image is read by the > the server returns the results to the client.

My questions:

  • How to communicate the client side with the algorithm? I really have no idea how to structure this.

  • How do I include the OpenCV module in Python on the server? I installed it on my machine, but I would need to install it also on the server, right? (Consider using AWS)

  • asked by anonymous 07.09.2017 / 04:50

    1 answer

    1

    1 - I would advise you to use some kind of Django WEB framework, Flask something like this, so you can easily program a site to upload that image.

    2 - Using AWS you can connect via ssh to the machine and install the necessary packages. It is a good practice to keep your dependencies in a file (requirements.txt use the command pip freeze> requirements.txt). Heroku for example looks for this file to install the dependencies of your project.

        
    06.11.2017 / 16:22