Skip to content

Commit

Permalink
chore: hide top-level setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Mar 24, 2022
1 parent f07e0f5 commit d67e429
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ You can change `0.0.0.0` to the intranet or public IP address to test the connec
```python
from clip_client import Client

c = Client('grpc://87.191.159.105:51000')
c = Client('grpc://87.105.159.191:51000')
```
3. To get sentence embedding:
```python
Expand Down Expand Up @@ -179,14 +179,14 @@ da.plot_image_sprites()

#### Encode images

Start the server with `python -m clip_server`. Let's say it's at `87.191.159.105:51000` with `GRPC` protocol (you will get this information after running the server).
Start the server with `python -m clip_server`. Let's say it's at `87.105.159.191:51000` with `GRPC` protocol (you will get this information after running the server).

Create a Python client script:

```python
from clip_client import Client

c = Client(server='grpc://87.191.159.105:51000')
c = Client(server='grpc://87.105.159.191:51000')

da = c.encode(da, show_progress=True)
```
Expand Down Expand Up @@ -333,7 +333,7 @@ Now encode these 6,403 sentences, it may take 10 seconds or less depending on yo
```python
from clip_client import Client

c = Client('grpc://87.191.159.105:51000')
c = Client('grpc://87.105.159.191:51000')

r = c.encode(da, show_progress=True)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ At the first time, it will download the default pretrained model, which may take
🔗 Protocol GRPC
🏠 Local access 0.0.0.0:51000
🔒 Private network 192.168.3.62:51000
🌐 Public address 87.191.159.105:51000
🌐 Public address 87.105.159.191:51000
```

It means the server is ready to serve. Note down the three addresses showed above, you will need them later.
Expand All @@ -71,7 +71,7 @@ It means the server is ready to serve. Note down the three addresses showed abov
Depending on the location of the client and server. You may use different IP addresses:
- Client and server are on the same machine: use local address e.g. `0.0.0.0`
- Client and server are behind the same router: use private network address e.g. `192.168.3.62`
- Server is in public network: use public network address e.g. `87.191.159.105`
- Server is in public network: use public network address e.g. `87.105.159.191`
```

Run the following Python script:
Expand Down
3 changes: 3 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ if [[ $1 == "final" ]]; then

pub_pypi client
pub_pypi server
cp setup.py ../
pub_pypi "."

VER_TAG_NEXT=$VER_TAG\'${NEXT_VER}\'
Expand All @@ -107,6 +108,7 @@ elif [[ $1 == 'rc' ]]; then

pub_pypi client
pub_pypi server
cp setup.py ../
pub_pypi "."

VER_TAG_NEXT=$VER_TAG\'${NEXT_VER}\'
Expand All @@ -127,5 +129,6 @@ else

pub_pypi client
pub_pypi server
cp setup.py ../
pub_pypi "."
fi
File renamed without changes.

0 comments on commit d67e429

Please sign in to comment.