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
4a7612e6
Commit
4a7612e6
authored
1 year ago
by
mansurzhenis
Browse files
Options
Downloads
Patches
Plain Diff
roboflow added
parent
dc62cecd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!18
roboflow added
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.py
+10
-0
10 additions, 0 deletions
app.py
with
10 additions
and
0 deletions
app.py
+
10
−
0
View file @
4a7612e6
...
...
@@ -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
'
)
...
...
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