Merge pull request #13

docs: hacker news example
This commit is contained in:
Florian Hönicke
2023-04-18 12:16:10 +02:00
committed by GitHub
3 changed files with 7 additions and 4 deletions

View File

@@ -104,22 +104,25 @@ jc delete <microservice id>
```bash
generate --description "Convert a chemical formula into a 2D chemical structure diagram" --test "C=C, CN=C=O, CCC(=O)O" --path microservice
```
<img src="res/chemical_formula_example.png" alt="Chemical Formula Visualization" width="600" />
## Hacker News Search
```bash
generate --description "Given a search query, find articles on hacker news using the hacker news api" --test "searching for GPT gives results" --path microservice
````
<img src="res/hacker_news_example.png" alt="Hacker News Search" width="600" />
### Animal Detector
```bash
gptdeploy generate --description "Given an image, return the image with bounding boxes of all animals (https://pjreddie.com/media/files/yolov3.weights, https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg)" --test "https://images.unsplash.com/photo-1444212477490-ca407925329e contains animals" --model gpt-4 --path microservice
```
<img src="res/animal_detector_example.png" alt="Animal Detector" width="600" />
### Meme Generator
```bash
gptdeploy generate --description "Generate a meme from an image and a caption" --test "Surprised Pikachu: https://media.wired.com/photos/5f87340d114b38fa1f8339f9/master/w_1600%2Cc_limit/Ideas_Surprised_Pikachu_HD.jpg, TOP:When you discovered GPTDeploy" --model gpt-4 --path microservice
```
<img src="res/meme_example.png" alt="Meme Generator" width="600" />
### Rhyme Generator

BIN
res/hacker_news_example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -150,7 +150,7 @@ response = client.post('/', inputs=DocumentArray([d])) # always use '/'
print(response[0].text) # can also be blob in case of image/audio..., this should be visualized in the streamlit app
```
Note that the response will always be in response[0].text
You must provide the complete file with the exact same syntax to wrap the code.
You must provide the complete app.py file with the exact same syntax to wrap the code.
The playground (app.py) must read the host from sys.argv[-1] because it will be started with a custom host: streamlit run app.py -- --host grpc://...
The playground (app.py) must not let the user configure the host on the ui.
'''