Skip to content
Snippets Groups Projects
Commit 4a7612e6 authored by mansurzhenis's avatar mansurzhenis
Browse files

roboflow added

parent dc62cecd
No related branches found
No related tags found
1 merge request!18roboflow added
......@@ -14,6 +14,10 @@ from functools import wraps
from analyze import start_analyze_service
from plant import Plant
from werkzeug.security import generate_password_hash, check_password_hash
from roboflow import Roboflow
rf = Roboflow(api_key="BxoASAWmZ2HRJFLiSshO")
project = rf.workspace().project("leafdata-bright")
model = project.version(1).model
......@@ -30,6 +34,12 @@ templateData = {
'time': datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
}
@app.route('/analyze', methods =['GET'])
def analyzeImage():
print(model.predict("image.jpg", confidence=40, overlap=30).json()) #pass the image that should be analyzed
model.predict("image.jpg", confidence=40, overlap=30).save("prediction.jpg")
return "Hello World"
@app.route('/signup')
def signup():
return render_template('signup.html')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment