diff --git a/README.md b/README.md index abcd270..0644ab8 100644 --- a/README.md +++ b/README.md @@ -104,22 +104,25 @@ jc delete ```bash generate --description "Convert a chemical formula into a 2D chemical structure diagram" --test "C=C, CN=C=O, CCC(=O)O" --path microservice ``` - Chemical Formula Visualization +## 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 +```` +Hacker News Search + ### 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 ``` - Animal Detector ### 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 ``` - Meme Generator ### Rhyme Generator diff --git a/res/hacker_news_example.png b/res/hacker_news_example.png new file mode 100644 index 0000000..a62b099 Binary files /dev/null and b/res/hacker_news_example.png differ diff --git a/src/options/generate/generator.py b/src/options/generate/generator.py index 3c26a54..5a4a3aa 100644 --- a/src/options/generate/generator.py +++ b/src/options/generate/generator.py @@ -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. '''