Skip to content

Commit

Permalink
Small markdown improvements (#44)
Browse files Browse the repository at this point in the history
* Add readme to doc tests

* formatting

* Add sample images

* Delete images
  • Loading branch information
mjvogelsong authored Apr 14, 2023
1 parent 47c5611 commit b31ff37
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test-integ: install ## Run tests against the integ API server (needs GROUNDLIGH
GROUNDLIGHT_ENDPOINT="https://api.integ.groundlight.ai/" ${PYTEST} ${TEST_ARGS} test

test-docs: install ## Run the example code and tests in our docs against the prod API (needs GROUNDLIGHT_API_TOKEN)
poetry run pytest -v --markdown-docs ${TEST_ARGS} docs
poetry run pytest -v --markdown-docs ${TEST_ARGS} docs README.md

# Adjust which paths we lint
LINT_PATHS="src test bin samples"
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ Groundlight makes it simple to build reliable visual applications. Read the [ful
pip install groundlight
```

Build a working computer vision system in just 5 lines of python:
Build a working computer vision system in just a few lines of python:

```python
from groundlight import Groundlight
from PIL import Image
import requests

gl = Groundlight()
d = gl.get_or_create_detector(name="door", query="Is the door open?")
image_query = gl.submit_image_query(detector=d, image=jpeg_img)
d = gl.get_or_create_detector(name="doorway", query="Is the doorway open?")
image_url = "https://images.selfstorage.com/large-compress/2174925f24362c479b2.jpg"
image = Image.open(requests.get(image_url, stream=True).raw)
image_query = gl.submit_image_query(detector=d, image=image)
print(f"The answer is {image_query.result}")
```

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[tool.poetry]
authors = ["Groundlight AI <[email protected]>"]
description = "Build computer vision systems from natural language with Groundlight"
homepage = "https://www.groundlight.ai"
homepage = "https://code.groundlight.ai/python-sdk"
license = "MIT"
name = "groundlight"
packages = [
{include = "**/*.py", from = "generated"},
{include = "**/*.py", from = "src"},
]
readme = "README.md"
version = "0.7.6"
version = "0.7.7"

[tool.poetry.dependencies]
certifi = "^2021.10.8"
Expand Down

0 comments on commit b31ff37

Please sign in to comment.