Skip to content

Commit 9aa7bc0

Browse files
authored
fix rerank and embeddings demo for windows and gpu (openvinotoolkit#3235)
1 parent d7724fb commit 9aa7bc0

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

demos/common/export_models/export_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def add_common_arguments(parser):
189189
"name": "{{model_name}}_embeddings_model",
190190
"base_path": "embeddings",
191191
"target_device": "{{target_device|default("CPU", true)}}",
192-
"plugin_config": { "NUM_STREAMS": {{num_streams|default("1", true)}} }
192+
"plugin_config": { "NUM_STREAMS": "{{num_streams|default(1, true)}}" }
193193
}
194194
}
195195
]
@@ -208,7 +208,7 @@ def add_common_arguments(parser):
208208
"name": "{{model_name}}_rerank_model",
209209
"base_path": "rerank",
210210
"target_device": "{{target_device|default("CPU", true)}}",
211-
"plugin_config": { "NUM_STREAMS": {{num_streams|default("1", true)}} }
211+
"plugin_config": { "NUM_STREAMS": "{{num_streams|default(1, true)}}" }
212212
}
213213
}
214214
]

demos/embeddings/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ content-type: application/json
126126

127127
:::{dropdown} **Request embeddings with cURL**
128128
```bash
129-
curl http://localhost:8000/v3/embeddings \
130-
-H "Content-Type: application/json" -d '{ "model": "Alibaba-NLP/gte-large-en-v1.5", "input": "hello world"}' | jq .
129+
curl http://localhost:8000/v3/embeddings -H "Content-Type: application/json" -d "{ \"model\": \"Alibaba-NLP/gte-large-en-v1.5\", \"input\": \"hello world\"}"
131130
```
132131
```json
133132
{

demos/rerank/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ content-type: application/json
106106
:::{dropdown} **Requesting rerank score with cURL**
107107

108108
```bash
109-
curl http://localhost:8000/v3/rerank -H "Content-Type: application/json" \
110-
-d '{ "model": "BAAI/bge-reranker-large", "query": "welcome", "documents":["good morning","farewell"]}' | jq .
109+
curl http://localhost:8000/v3/rerank -H "Content-Type: application/json" -d "{ \"model\": \"BAAI/bge-reranker-large\", \"query\": \"welcome\", \"documents\":[\"good morning\",\"farewell\"]}"
111110
```
112111
```json
113112
{

0 commit comments

Comments
 (0)