Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
Heal_App
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TMP-23-365
Heal_App
Commits
6c9d08c2
Commit
6c9d08c2
authored
Aug 30, 2023
by
Yomal-Dulanjana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app.py File create and DB connection setup
parent
cc2d77fd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
ml/__pycache__/app.cpython-311.pyc
ml/__pycache__/app.cpython-311.pyc
+0
-0
ml/__pycache__/inference.cpython-311.pyc
ml/__pycache__/inference.cpython-311.pyc
+0
-0
ml/app.py
ml/app.py
+39
-0
No files found.
ml/__pycache__/app.cpython-311.pyc
View file @
6c9d08c2
No preview for this file type
ml/__pycache__/inference.cpython-311.pyc
View file @
6c9d08c2
No preview for this file type
ml/app.py
View file @
6c9d08c2
from
inference
import
*
from
flask_cors
import
CORS
from
flask
import
Flask
,
Response
,
request
from
pymongo
import
MongoClient
import
threading
import
requests
import
schedule
import
time
import
random
from
datetime
import
datetime
app
=
Flask
(
__name__
)
CORS
(
app
)
def
risk
():
risk_level
,
HeartRateArr
,
BloodOxygenLevelArr
,
BodyTemperatureArr
=
risk_level_prediction
()
print
(
risk_level
)
def
update_risk_level
():
while
True
:
risk
()
time
.
sleep
(
120
)
thread1
=
threading
.
Thread
(
target
=
update_risk_level
)
thread1
.
start
()
print
(
"test"
)
if
__name__
==
"__main__"
:
app
.
run
(
debug
=
True
,
host
=
'0.0.0.0'
,
port
=
5000
,
threaded
=
False
,
use_reloader
=
True
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment