Skip to content

Commit

Permalink
docs: remove jina self-hosted parts (#942)
Browse files Browse the repository at this point in the history
* docs: remove jc parts

* docs: update jina version

jina==3.14.1

* docs: black the setup files

* docs: update jina version req

* docs: black files

* docs: update versions

* docs: update versions

* docs: update versions

* docs: version problem

* docs: another version try

* docs: update versions

* docs: jina versions

* docs: version problems

* docs: version detect

* docs: version problem

* docs: update openclip version

* docs: onnx version fixed

* docs: install precommit

* docs: revert black
  • Loading branch information
Zihao Jing authored Dec 20, 2023
1 parent d4e7a30 commit ca2b25b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 69 deletions.
6 changes: 5 additions & 1 deletion client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
long_description_content_type='text/markdown',
zip_safe=False,
setup_requires=['setuptools>=18.0', 'wheel'],
install_requires=['jina>=3.12.0', 'docarray[common]>=0.19.0,<0.30.0', 'packaging'],
install_requires=[
'jina>=3.12.0',
'docarray[common]>=0.19.0,<0.30.0',
'packaging',
],
extras_require={
'test': [
'pytest',
Expand Down
2 changes: 1 addition & 1 deletion docs/hosting/colab.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Please follow the walk-through there. Enjoy the free GPU/TPU to build your aweso


```{tip}
Hosing service on Google Colab is not recommended if you server aims to be long-live or permanent. It is often used for quick experiment, demonstration or leveraging its free GPU/TPU. For stable, secure and free hosting of Jina apps, please check out [Jcloud](https://docs.jina.ai/fundamentals/jcloud/).
Hosing service on Google Colab is not recommended if you server aims to be long-live or permanent. It is often used for quick experiment, demonstration or leveraging its free GPU/TPU. For stable, please deploy the CLIP model on your own server.
```


Expand Down
61 changes: 1 addition & 60 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Welcome to CLIP-as-service!

```{include} ../README.md
:start-after: <!-- start inference-banner -->
:end-before: <!-- end inference-banner -->
```

```{include} ../README.md
:start-after: <!-- start elevator-pitch -->
Expand All @@ -12,60 +8,6 @@

## Try it!

You can access to the hosted CLIP service at [Jina AI's Inference](https://cloud.jina.ai/user/inference) with free credits.
Inference provides a selection of AI models for common tasks, such as visual reasoning, question answering, or embedding modalities like texts and images.
All the available models are accessible via simple API calls - HTTPS or gRPC.
Read this [Inference Guide](https://clip-as-service.jina.ai/hosting/by-jina/) to learn more.

````{tab} via gRPC ⚡⚡
```bash
pip install clip-client
```
```{code-block} python
---
emphasize-lines: 5
---
from clip_client import Client
c = Client(
'grpcs://<your-inference-address>-grpc.wolf.jina.ai',
credential={'Authorization': '<your access token>'}
)
r = c.encode(
[
'First do it',
'then do it right',
'then do it better',
'https://picsum.photos/200',
]
)
print(r)
```
````

````{tab} via HTTPS 🔐
```{code-block} bash
---
emphasize-lines: 4
---
curl \
-X POST https://<your-inference-address>-http.wolf.jina.ai/post \
-H 'Content-Type: application/json' \
-H 'Authorization: <your access token>' \
-d '{"data":[{"text": "First do it"},
{"text": "then do it right"},
{"text": "then do it better"},
{"uri": "https://picsum.photos/200"}],
"execEndpoint":"/"}'
```
````

## Install

![PyPI](https://img.shields.io/pypi/v/clip_client?color=%23ffffff&label=%20) is the latest version.
Expand Down Expand Up @@ -206,8 +148,7 @@ user-guides/faq
:caption: Hosting
:hidden:
hosting/by-jina
hosting/on-jcloud
hosting/colab
```

Expand Down
3 changes: 0 additions & 3 deletions docs/user-guides/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ The URL-like scheme `grpc://0.0.0.0:23456` is what you get after {ref}`running t
| `port` | The public port of the server | `51234` |

Jina AI provides a hosted service for CLIP models. Refer [here](hosting/by-jina#by-jina-python) for more details on how to connect to the hosted service.

## Encoding

Expand Down Expand Up @@ -629,5 +628,3 @@ curl -X POST http://0.0.0.0:51000/post \
[-0.022064208984375,0.1044921875,...]
[-0.0750732421875,-0.166015625,...]
```
To connect to the CLIP server hosted by Jina AI, please refer to [this page](/hosting/by-jina#by-jina-curl).
8 changes: 4 additions & 4 deletions server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
'regex',
'torchvision<=0.13.0' if sys.version_info <= (3, 7, 2) else 'torchvision',
'jina>=3.12.0',
'docarray<0.30.0',
'docarray==0.21.0',
'prometheus-client',
'open_clip_torch>=2.8.0',
'pillow-avif-plugin'
'open_clip_torch>=2.8.0,<2.9.0',
'pillow-avif-plugin',
],
extras_require={
'onnx': [
'onnx',
'onnxmltools',
'onnxmltools<1.12.0',
]
+ (
['onnxruntime-gpu<=1.13.1']
Expand Down

0 comments on commit ca2b25b

Please sign in to comment.