Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-J 58
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
5
Merge Requests
5
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
22_23-J 58
22_23-J 58
Commits
5bbcc56a
Commit
5bbcc56a
authored
May 15, 2023
by
IT19955728_JathunarachchiRT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update main.py
parent
dfac6c59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
main.py
main.py
+5
-5
No files found.
main.py
View file @
5bbcc56a
...
...
@@ -32,7 +32,7 @@ app.add_middleware(
allow_headers
=
headers
)
model_dir
=
"Fish_identificaton.h5"
#
model_dir = "Fish_identificaton.h5"
model
=
load_model
(
model_dir
)
# Providing the folder path
...
...
@@ -57,14 +57,14 @@ model = load_model(model_dir)
# # origin = image_link
# # )
def
get_net_image_prediction
():
#
def get_net_image_prediction():
# myfile = open('C:/xampp/htdocs/templates/php/files/fishimage.jpg')
# myfile = open('C:\\xampp\\htdocs\\templates\\php\\files\\fishimage.jpg','r')
shutil
.
copy
(
origin
,
target
)
shutil
.
copy
(
origin
,
target2
)
img_path
=
"fishimage.jpg"
#
img_path = "fishimage.jpg"
img
=
load_img
(
img_path
,
...
...
@@ -94,7 +94,7 @@ templates = Jinja2Templates(directory="templates")
@
app
.
get
(
"/"
)
async
def
root
():
return
{
"message"
:
"Welcome to the Fish Identifications API!"
}
#
return {"message": "Welcome to the Fish Identifications API!"}
# @app.post("/net/image/prediction/")
...
...
@@ -109,7 +109,7 @@ async def send_image_get_prediction(request: Request):
rtt
=
get_net_image_prediction
()
return
templates
.
TemplateResponse
(
"Saveimage.html"
,
{
"request"
:
request
,
"variable"
:
rtt
})
#
return templates.TemplateResponse("Saveimage.html", {"request": request, "variable": rtt})
# async def send_image_get_prediction():
...
...
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