-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
32 lines (23 loc) · 803 Bytes
/
app.py
File metadata and controls
32 lines (23 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from flask import Flask, request
app = Flask(__name__)
@app.route("/")
def index():
return('''
<html>
<head>
<title> Dog Breed Identifier </title>
</head>
<body>
<h1> Dog Breed Identifier </h1>
<p> This app identifies images. It can distinguish between 1) human, dog and other and 2) dog breed </p>
<p> Please paste path to an image below and press run... </p>
<form action="/result" method="GET"> <input name="text"><input type="submit" value="RUN"></form>
</body>
</html>
''')
@app.route("/result")
def result():
result = request.args.get('text', '')
return("The result is: " + result * 2)
if __name__ == "__main__":
app.run()