-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zachary Hanif
committed
Nov 7, 2019
1 parent
52a87c6
commit 739a042
Showing
1 changed file
with
21 additions
and
3 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 |
---|---|---|
@@ -1,10 +1,28 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route('/upload', methods=['GET', 'POST']) | ||
def upload(): | ||
if flask.request.method == 'POST': | ||
return 'Submitted experiment.' | ||
|
||
return '''<form method="POST"> | ||
Data: <input type="text" name="data"><br> | ||
<input type="submit" value="Submit"><br> | ||
</form>''' | ||
|
||
@app.route('/compare/<path:experiment_one>/<path:experiment_two>') | ||
def compare(): | ||
return 'This is the compare function for two experiments.' | ||
|
||
@app.route('/experiment') | ||
def experiment(): | ||
return 'This is the view of an experiment' | ||
|
||
@app.route('/hello') | ||
def hello(): | ||
return ‘Hello!’ | ||
return 'Hello!' | ||
|
||
if __name__ == '__main__': | ||
app.run(debug=True, host='0.0.0.0') |