-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9530571
commit 40213ac
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# FastAPI - fastML | ||
|
||
That repository contains an API to send request our Random Forest Classification algorithm. | ||
|
||
FastAPI is a modern, fast, web framework for building APIs with Python 3.7+ based on standard Python type hints. It is designed to be easy to use and to enable the development of high-performance APIs quickly. | ||
|
||
<br> | ||
|
||
##### USED LIBRARIES: | ||
<br> | ||
|
||
``` | ||
FastAPI | ||
BaseModel | ||
pickle | ||
pandas | ||
sklearn | ||
``` | ||
|
||
|
||
|
||
##### PICKLE: | ||
|
||
The `pickle` module is frequently used to package (serialize) and store machine learning models in Python. | ||
|
||
``` | ||
import pickle | ||
with open('random-forest.pkl', 'wb') as file: | ||
pickle.dump(rfc, file) | ||
``` | ||
|
||
|
||
##### RUN COMMANDS: | ||
|
||
``` | ||
python -m venv fastml | ||
source fastml/bin/activate (mac) or .\fastml\Scripts\activate (windows) | ||
pip install uvicorn gunicorn fastapi pydantic sklearn pandas | ||
uvicorn random-classifier-api:app --reload | ||
``` | ||
|
||
|
||
|