-
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
44ac3c3
commit fa2c495
Showing
1 changed file
with
8 additions
and
4 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Green Bite API π± | ||
Green Bite __attempts__ to calculate sustainability scores for food. Sometimes it even works! π€·ββοΈ Part of my masters thesis on ingredient matching to determine the sustainability of online recipes. (Information Science, UiB: 2020). | ||
|
||
|
||
## How are sustainability scores calculated? π‘ | ||
Using this formula | ||
`(amount_kg * land_usage) + (amount_kg * greenhouse_gas_emissions) = sustainability_score` | ||
|
@@ -12,18 +13,21 @@ Using this formula | |
* **Alot** of assumptions and simplifications. Take the results with a shovel of salt. π§ | ||
|
||
## Quickstart | ||
* Make sure you have [Docker](https://www.docker.com/get-started) installed | ||
* Make sure you have [Docker](https://www.docker.com/get-started) installed and that it is running. | ||
|
||
1. `git clone [email protected]:arienshibani/green-bite.git` | ||
1. β¨ Clone repo `git clone [email protected]:arienshibani/green-bite.git` | ||
|
||
2. ποΈ Build image `docker build -t green-bite` | ||
2. ποΈ Navigate into repo and build the image `docker build .` | ||
|
||
3. π Run container `docker run -p 80:80 green-bite` | ||
|
||
The API should now be available π http://0.0.0.0/docs | ||
Open API specification should now be available locally! π http://0.0.0.0/docs | ||
|
||
## Example Usage | ||
|
||
![image](https://github.com/arienshibani/green-bite/assets/22197324/2df0c8f0-e957-4385-aff2-60cc5d1afa05) | ||
|
||
|
||
GET `http://0.0.0.0/parse/ingredient/1%20kg%20of%20bacon` | ||
|
||
Response π | ||
|