Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Flood Prediction
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
Intelligent Tank Management System
Flood Prediction
Commits
65b2cd87
Commit
65b2cd87
authored
Jul 18, 2022
by
Mohamed Naseef
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
d3129896
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
main.py
main.py
+29
-0
No files found.
main.py
0 → 100644
View file @
65b2cd87
from
flask
import
Flask
,
request
import
json
from
chat
import
chat_bot
from
decisiontree
import
calculate
from
landanalysis
import
land_analysis
app
=
Flask
(
__name__
)
@
app
.
route
(
'/chat_bot'
,
methods
=
[
'POST'
])
def
process_json
():
json
=
request
.
json
print
(
"json data: "
,
json
[
'message'
])
return
{
"output"
:
chat_bot
(
json
[
'message'
])}
@
app
.
route
(
'/decession_tree'
,
methods
=
[
'GET'
])
def
process_json_decission
():
return
{
"output"
:
calculate
()}
@
app
.
route
(
'/land_analysis'
,
methods
=
[
'POST'
])
def
process_json_land
():
json
=
request
.
json
lat
=
json
[
'lat'
]
long
=
json
[
'long'
]
return
{
"output"
:
land_analysis
(
lat
,
long
)}
if
__name__
==
'__main__'
:
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
)
\ No newline at end of file
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