Skip to content

Server & Application

JJangA9 edited this page Jun 21, 2020 · 25 revisions

Server

This is how to set python flask server.

Download

python
Download python at http://www.python.org/downloads

Install python flask

  1. Upgrade python pip install --upgrade pip upgrade python

  2. Install python flask pip install flask install flask

Sample Code

  • Receive image from App
def handle_request():
    imagefile = flask.request.files['image']
    filename = werkzeug.utils.secure_filename(imagefile.filename)
    print("\nReceived image File name : " + imagefile.filename)
    imagefile.save("static/img/"+ imagefile.filename)
    return "image received"
  • Send image to App
@app.route('/imgToHtml')
def image_to_html():
    return render_template('img.html',image_file="img/androidFlask.jpg")

Application

This is smart coordinator application.

Main Layout

main layout

  • Start Screen
    Moving GIF image used Glide
  • Closet Scren
    If you click light button in closet screen, change to closet layout.

Closet Layout

closet layout

  • If you click camera or album button, you can upload image.
    Masked images appear in the application.
  • If clothes are clicked, recommend clothes that match them.

Calendar / Weather Layout

calendar, weather layout

License

Copyright 2020 jungyg1228 (YouJi Jeong)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Clone this wiki locally