Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vicgalle authored Jul 27, 2021
1 parent d8961cb commit 0a71b7d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ An API to interact with the GPT-J language model. You can use and test the model

## Using the API

* Bash:

```
curl -X 'POST' \
'http://api.vicgalle.net:5000/generate?context=In%20a%20shocking%20finding%2C%20scientists%20discovered%20a%20herd%20of%20unicorns%20living%20in%20a%20remote%2C%20previously%20unexplored%20valley%2C%20in%20the%20Andes%20Mountains.%20Even%20more%20surprising%20to%20the%20researchers%20was%20the%20fact%20that%20the%20unicorns%20spoke%20perfect%20English.&token_max_length=512&temperature=1&top_p=0.9' \
-H 'accept: application/json' \
-d ''
```

* Python:

```
Expand All @@ -35,7 +26,16 @@ response = requests.post("http://api.vicgalle.net:5000/generate", params=payload
print(response)
```

## Deployment of the API
* Bash:

```
curl -X 'POST' \
'http://api.vicgalle.net:5000/generate?context=In%20a%20shocking%20finding%2C%20scientists%20discovered%20a%20herd%20of%20unicorns%20living%20in%20a%20remote%2C%20previously%20unexplored%20valley%2C%20in%20the%20Andes%20Mountains.%20Even%20more%20surprising%20to%20the%20researchers%20was%20the%20fact%20that%20the%20unicorns%20spoke%20perfect%20English.&token_max_length=512&temperature=1&top_p=0.9' \
-H 'accept: application/json' \
-d ''
```

## Deployment of the API server

Just ssh into a TPU VM. This code was only tested on the v3-8 variants, which you can apply for free at https://sites.research.google/trc/.

Expand All @@ -54,7 +54,7 @@ python3 serve.py

Then, you can go to http://localhost:5000/docs and use the API!

## Deploy the app
## Deploy the streamlit dashboard

Just run

Expand Down

0 comments on commit 0a71b7d

Please sign in to comment.