Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cyber-Physical Systems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Luno Becker
Cyber-Physical Systems
Commits
b418a01a
Commit
b418a01a
authored
1 year ago
by
Philipp Jonas Krieg
Browse files
Options
Downloads
Patches
Plain Diff
route /api is not longer used
parent
e800cecb
No related branches found
Branches containing commit
No related tags found
1 merge request
!29
Finished Communication Logic
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.py
+2
-12
2 additions, 12 deletions
app.py
with
2 additions
and
12 deletions
app.py
+
2
−
12
View file @
b418a01a
...
...
@@ -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
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment