File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ RUN apt-get install -y libglib2.0-0
88RUN pip install git+https://github.com/UPstartDeveloper/Fire-Detection-API
99EXPOSE 8080
1010
11- ENTRYPOINT uvicorn main:app --host 0.0.0.0 --port 8080 --workers 1
11+ ENTRYPOINT uvicorn app. main:app --host 0.0.0.0 --port 8080 --workers 1
Original file line number Diff line number Diff line change 22
33from fire_classifier .predictor import ImagePredictor
44
5- app = FastAPI ()
5+ app = FastAPI (
6+ title = "Fire Detection API" ,
7+ description = "Informs the probability that an image contains fire."
8+ )
69
710predictor_config_path = "./app/config.yaml"
811
912predictor = ImagePredictor .init_from_config_url (predictor_config_path )
1013
1114
12- @app .post ("/scorefile /" )
15+ @app .post ("/classify-image /" )
1316def create_upload_file (file : UploadFile = File (...)):
17+ '''Predicts the possibility that a RBG image contains fire.'''
1418 return predictor .predict_from_file (file .file )
Original file line number Diff line number Diff line change 11numpy
22tensorflow-cpu
33fastapi == 0.49.0
4- opencv-python == 4.5.3.56
4+ opencv-python-headless == 4.5.3.56
55PyYAML == 5.3
66uvicorn
77python-multipart
You can’t perform that action at this time.
0 commit comments