Skip to content
Snippets Groups Projects
Commit b418a01a authored by Philipp Jonas Krieg's avatar Philipp Jonas Krieg
Browse files

route /api is not longer used

parent e800cecb
No related branches found
No related tags found
1 merge request!29Finished Communication Logic
......@@ -46,7 +46,6 @@ def analyzeImage():
print("[app.py] Analyzed picture received")
return msg
#sign up url
@app.route('/signup')
def signup():
......@@ -133,20 +132,19 @@ def steuerung():
def analyse():
templateData['time'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
return render_template('analyse.html', **templateData)
#bildanalyse
@app.route('/getResultAnalysis',methods=['GET'])
def get_result_analysis():
rf = Roboflow(api_key="MLqKLvLz35tSg9r3UlAV")
project = rf.workspace().project("leafdata-bright")
model = project.version(1).model
ergebnis = model.predict("static/plant_photo.jpg", confidence=15, overlap=50)
ergebnis.save("static/prediction.jpg")
message = ergebnis.json()
print("analyzed picture received.")
return message
#logout
@app.route('/logout')
@login_required
......@@ -155,14 +153,6 @@ def logout():
flash('You were just logged out!')
return redirect(url_for('login'))
@app.route('/api',methods=['POST'])
def getph():
data = request.get_json()
p.ph_status = data['phValue']
return jsonify({'phValue': p.ph_status})
#anfrage an arduino
@app.route('/getState',methods=['GET'])
def get_state():
......
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