Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-074
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
1
Merge Requests
1
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
2022-074
2022-074
Commits
7eda4615
Commit
7eda4615
authored
Nov 15, 2022
by
IT19110530-Pramodini A.A.D.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main python
parent
90f9f6a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
Server_Impl/main.py
Server_Impl/main.py
+24
-0
No files found.
Server_Impl/main.py
0 → 100644
View file @
7eda4615
from
fastapi
import
FastAPI
,
UploadFile
,
File
import
shutil
import
model
from
pipeline
import
pipeline
app
=
FastAPI
()
@
app
.
get
(
"/"
)
def
write_home
():
return
{
"version"
:
"0.1"
}
@
app
.
post
(
"/predict"
)
async
def
predict
(
file
:
UploadFile
=
File
(
...
)):
print
(
'******************************************'
)
with
open
(
f
'input
\
{file.filename}'
,
"wb"
)
as
buffer
:
shutil
.
copyfileobj
(
file
.
file
,
buffer
)
output_file
=
pipeline
(
f
'input
\
{file.filename}'
,
"output/"
)
return
{
"Ouput File"
:
output_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