Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: remove jina self-hosted parts #942

Merged
merged 19 commits into from
Dec 20, 2023
112 changes: 58 additions & 54 deletions client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,85 +5,89 @@
from setuptools import setup

if sys.version_info < (3, 7, 0):
raise OSError(f'CLIP-as-service requires Python >=3.7, but yours is {sys.version}')
raise OSError(f"CLIP-as-service requires Python >=3.7, but yours is {sys.version}")

try:
pkg_name = 'clip-client'
pkg_name = "clip-client"
selmiss marked this conversation as resolved.
Show resolved Hide resolved
libinfo_py = path.join(
path.dirname(__file__), pkg_name.replace('-', '_'), '__init__.py'
path.dirname(__file__), pkg_name.replace("-", "_"), "__init__.py"
)
libinfo_content = open(libinfo_py, 'r', encoding='utf8').readlines()
version_line = [l.strip() for l in libinfo_content if l.startswith('__version__')][
libinfo_content = open(libinfo_py, "r", encoding="utf8").readlines()
version_line = [l.strip() for l in libinfo_content if l.startswith("__version__")][
0
]
exec(version_line) # gives __version__
except FileNotFoundError as ex:
__version__ = '0.0.0'
__version__ = "0.0.0"

try:
with open('../README.md', encoding='utf8') as fp:
with open("../README.md", encoding="utf8") as fp:
_long_description = fp.read()
except FileNotFoundError:
_long_description = ''
_long_description = ""

setup(
name=pkg_name,
packages=find_packages(),
version=__version__,
include_package_data=True,
description='Embed images and sentences into fixed-length vectors via CLIP',
author='Jina AI',
author_email='[email protected]',
license='Apache 2.0',
url='https://github.com/jina-ai/clip-as-service',
download_url='https://github.com/jina-ai/clip-as-service/tags',
description="Embed images and sentences into fixed-length vectors via CLIP",
author="Jina AI",
author_email="[email protected]",
license="Apache 2.0",
url="https://github.com/jina-ai/clip-as-service",
download_url="https://github.com/jina-ai/clip-as-service/tags",
long_description=_long_description,
long_description_content_type='text/markdown',
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'],
setup_requires=["setuptools>=18.0", "wheel"],
install_requires=[
"jina>=3.12.0",
"docarray[common]>=0.19.0,<0.30.0",
"packaging",
],
extras_require={
'test': [
'pytest',
'pytest-timeout',
'pytest-mock',
'pytest-asyncio',
'pytest-cov',
'pytest-repeat',
'pytest-reraise',
'mock',
'pytest-custom_exit_code',
'black',
"test": [
"pytest",
"pytest-timeout",
"pytest-mock",
"pytest-asyncio",
"pytest-cov",
"pytest-repeat",
"pytest-reraise",
"mock",
"pytest-custom_exit_code",
"black",
],
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Unix Shell',
'Environment :: Console',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Topic :: Database :: Database Engines/Servers',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
'Topic :: Scientific/Engineering :: Image Recognition',
'Topic :: Multimedia :: Video',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Unix Shell",
"Environment :: Console",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Database :: Database Engines/Servers",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
"Topic :: Scientific/Engineering :: Image Recognition",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
project_urls={
'Documentation': 'https://clip-as-service.jina.ai',
'Source': 'https://github.com/jina-ai/clip-as-service/',
'Tracker': 'https://github.com/jina-ai/clip-as-service/issues',
"Documentation": "https://clip-as-service.jina.ai",
"Source": "https://github.com/jina-ai/clip-as-service/",
"Tracker": "https://github.com/jina-ai/clip-as-service/issues",
},
keywords='jina openai clip deep-learning cross-modal multi-modal neural-search',
keywords="jina openai clip deep-learning cross-modal multi-modal neural-search",
)
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
60 changes: 0 additions & 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,6 @@ 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).
Loading
Loading