Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ python -m pip install flask

## Install Dotenv

We also have install the `dotenv` library which we use to load environment variables. You can find the package link [here](https://pypi.org/project/python-dotenv/).
We also have to install the `dotenv` library which we use to load environment variables. You can find the package link [here](https://pypi.org/project/python-dotenv/).

```shell
pip install python-dotenv
```

## Install Requests

The last package we have to add is `requests` which is a library to handle http requests. You can find the package link [here](https://pypi.org/project/requests/).
The last package we need to add is `requests` which is a library to handle http requests. You can find the package link [here](https://pypi.org/project/requests/).

```shell
pip install python-dotenv
Expand Down Expand Up @@ -124,7 +124,7 @@ Create an `.env` file at the root of the project. This is where we will place ou

## Add variables to the .env file

Open the `.env` file and add `HUGGING_FACE_API_URL= `and `HUGGING_FACE_API_KEY=`, ading in your API key and URL. This is where we place the hugging face data to allow us to use hugging face's models.
Open the `.env` file and add `HUGGING_FACE_API_URL= `and `HUGGING_FACE_API_KEY=`, adding in your API key and URL. This is where we place the hugging face data to allow us to use hugging face's models.

```shell
HUGGING_FACE_API_URL=https://api-inference.huggingface.co/models/julien-c/hotdog-not-hotdog
Expand Down Expand Up @@ -278,7 +278,7 @@ python3 web.py

## Bonus implement the successor Not Bannana.

The not\_hot\_dog model was originally created by Julien C at https://huggingface.co/julien-c. Now the fun thing is you can actually train your own version of the model which we can save for another time, but in the meantime you can replace your `HUGGING_FACE_API_URL` with one I created for not bannanas. Just upload pictures of Bannanas instead of hot dogs.
The not\_hot\_dog model was originally created by Julien C at https://huggingface.co/julien-c. Now the fun thing is you can actually train your own version of the model, which we can save for another time, but in the meantime you can replace your `HUGGING_FACE_API_URL` with one I created for not bannanas. Just upload pictures of Bannanas instead of hot dogs.

## Replace your Url

Expand All @@ -294,7 +294,7 @@ Now run the project again and upload bannanas or anything not bannanas.

You did it, you are a Silicon Valley Legend just like Jian Yang, and now we have two APIs that can detect whether something is not a hot dog or is not a bannana. If you keep this innovation up you will be raising money from Top VCs like Peter Gregory at Raviga and be on your way to be the next Hooli or Pied Piper. Thanks for reading!

Hope you enjoyed the tutorial. If you have any questions, reach out to me on my linkedin [andrewryanvanbeek](https://www.linkedin.com/in/andrewryanvanbeek). Also if you interested in following what I am personally building check out [Dev-Docs](https://dev-docs.typedream.app/).
Hope you enjoyed the tutorial. If you have any questions, reach out to me on my linkedin [andrewryanvanbeek](https://www.linkedin.com/in/andrewryanvanbeek). Also if you are interested in following what I am personally building check out [Dev-Docs](https://dev-docs.typedream.app/).

## More Resources

Expand Down