Dependencies (Only needs to do the first time and when new library is added)
- Use python 3.10 (Below should work but I'm using 3.10)
- Install FastApi:
pip install "fastapi[all]"
- Install pandas:
pip install pandas
To run
-
cd backend
-
python3 main.py
To call the endpoint
Use provided swagger UI when you run the app. You can access it here; http://localhost:8000/docs or more specifically; http://127.0.0.1:8000/docs#/airbnb/get_airbnb_list_api_airbnb_list_post
Remember to edit the request body which the api endpoint will receive.
An example request body json:
{
"airbnb_price_range": [
0, 400
],
"airbnb_room_type": [
"Room A", "Room B"
],
"amenity_preference": [
"Food", "Transportation"
]
}
Note:
The logic for our airbnb computation will live in backend/src/airbnb_service.py
. The cleaned_data will live in backend/cleaned_data
.
Dependencies (Only needs to do the first time and when new library is added)
- Use node 18
-
cd frontend
-
npm install
To run
-
cd frontend
(If you haven't already) -
npm start
You can check it out at http://localhost:3000