Skip to content

Commit 1db7b8b

Browse files
committed
Remove code snippets
1 parent b514093 commit 1db7b8b

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

docs/source/en/quick_tour.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ You can install it via pip as `pip install --upgrade openai`, and then run:
8383
import os
8484
from openai import OpenAI
8585

86-
client = OpenAI(base_url="http://localhost:8080/embed")
86+
client = OpenAI(base_url="http://localhost:8080/v1/embeddings")
8787

8888
response = client.embeddings.create(
8989
model="tei",
@@ -121,17 +121,6 @@ curl 127.0.0.1:8080/rerank \
121121
-H 'Content-Type: application/json'
122122
```
123123

124-
Alternatively, one can perform inference using the `huggingface_hub` Python SDK. You can install it via pip as `pip install --upgrade --quiet huggingface_hub`, and then run:
125-
126-
```python
127-
from huggingface_hub import InferenceClient
128-
129-
client = InferenceClient()
130-
embedding = client.feature_extraction("What is deep learning?",
131-
model="http://localhost:8080/rerank")
132-
print(len(embedding[0]))
133-
```
134-
135124
### Sequence classification models
136125

137126
You can also use classic Sequence Classification models like [`SamLowe/roberta-base-go_emotions`](https://huggingface.co/SamLowe/roberta-base-go_emotions):
@@ -152,17 +141,6 @@ curl 127.0.0.1:8080/predict \
152141
-H 'Content-Type: application/json'
153142
```
154143

155-
Alternatively, one can perform inference using the `huggingface_hub` Python SDK. You can install it via pip as `pip install --upgrade --quiet huggingface_hub`, and then run:
156-
157-
```python
158-
from huggingface_hub import InferenceClient
159-
160-
client = InferenceClient()
161-
embedding = client.feature_extraction("What is deep learning?",
162-
model="http://localhost:8080/predict")
163-
print(len(embedding[0]))
164-
```
165-
166144
## Batching
167145

168146
You can send multiple inputs in a batch. For example, for embeddings:

0 commit comments

Comments
 (0)