-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(web):add flask server with restapi
changed web filestructure build flask server with get index method and post predict method closes #6
- Loading branch information
Showing
7 changed files
with
56 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from flask import Flask, render_template | ||
app = Flask(__name__) | ||
|
||
@app.route('/', methods=['GET']) | ||
def hello_world(): | ||
return render_template('index.html') | ||
|
||
@app.route('/predict', methods=['POST']) | ||
def predict(id, permission): | ||
return 'Hello World!!!!' | ||
|
||
if __name__ == '__main__': | ||
app.run(host = '0.0.0.0', debug = True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>IP Hartung</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" type="text/css" media="screen" href="../static/style.css" /> | ||
</head> | ||
|
||
<body onload="toggleFullScreen()"> | ||
<div id="bannerWrapper"> | ||
<h1 id="issaBiggerText">Drücken Sie Enter und lassen Sie Ihr Alter schätzen</h1> | ||
<h2 id="issaSmallerText">und stimmen zu, dass ihr Bild für das Trainieren der | ||
Software weiterverwendet wird.</h2> | ||
</div> | ||
<div id="wrapper"> | ||
<video autoplay id="webcam"> | ||
</video> | ||
</div> | ||
<div id="userForm"> | ||
<img src="../static/userForm.png" alt=""> | ||
</div> | ||
<div id="heartLoader"> | ||
<div></div> | ||
</div> | ||
|
||
<!-- height and width needs to get adpopted to the pixels of the webcam--> | ||
<canvas id="canvas" height="1040px" width="1380px"></canvas> | ||
<script src="../static/custom.js"></script> | ||
</body> | ||
|
||
</html> |
This file was deleted.
Oops, something went wrong.