Skip to content

Commit d422929

Browse files
authored
doc: fix broken image reference and markdown (#789)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
1 parent a3fa0d6 commit d422929

File tree

1 file changed

+82
-82
lines changed
  • VideoRAGQnA/docker_compose/intel/cpu/xeon

1 file changed

+82
-82
lines changed

VideoRAGQnA/docker_compose/intel/cpu/xeon/README.md

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ Since the `compose.yaml` will consume some environment variables, you need to se
127127

128128
**Export the value of the public IP address of your Xeon server to the `host_ip` environment variable**
129129

130-
> Change the External_Public_IP below with the actual IPV4 value
130+
> Change the `External_Public_IP` below with the actual IPV4 value
131131
132132
```
133133
export host_ip="External_Public_IP"
134134
```
135135

136136
**Export the value of your Huggingface API token to the `your_hf_api_token` environment variable**
137137

138-
> Change the Your_Huggingface_API_Token below with tyour actual Huggingface API Token value
138+
> Change the `Your_Huggingface_API_Token` below with your actual Huggingface API Token value
139139
140140
```
141141
export your_hf_api_token="Your_Huggingface_API_Token"
@@ -175,7 +175,7 @@ export USECLIP=1
175175
export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token}
176176
```
177177

178-
Note: Please replace with `host_ip` with you external IP address, do not use localhost.
178+
Note: Replace with `host_ip` with you external IP address, do not use localhost.
179179

180180
### Start all the services with Docker Containers
181181

@@ -209,110 +209,110 @@ docker compose up -d
209209

210210
1. Dataprep Microservice
211211

212-
Once the microservice is up, please ingest the videos files into vector store using dataprep microservice. Both single and multiple file(s) upload are supported.
213-
214-
```bash
215-
# Single file upload
216-
curl -X POST ${DATAPREP_SERVICE_ENDPOINT} \
217-
-H "Content-Type: multipart/form-data" \
218-
-F "files=@./file1.mp4"
219-
# Multiple file upload
220-
curl -X POST ${DATAPREP_SERVICE_ENDPOINT} \
221-
-H "Content-Type: multipart/form-data" \
222-
-F "files=@./file1.mp4" \
223-
-F "files=@./file2.mp4" \
224-
-F "files=@./file3.mp4"
225-
```
226-
227-
Use below method to check and download available videos the microservice. The download endpoint is also used for LVM and UI.
228-
229-
```bash
230-
# List available videos
231-
curl -X 'GET' ${DATAPREP_GET_VIDEO_LIST_ENDPOINT} -H 'accept: application/json'
232-
# Download available video
233-
curl -X 'GET' ${DATAPREP_GET_FILE_ENDPOINT}/video_name.mp4' -H 'accept: application/json'
234-
```
212+
Once the microservice is up, ingest the videos files into vector store using dataprep microservice. Both single and multiple file(s) uploads are supported.
213+
214+
```bash
215+
# Single file upload
216+
curl -X POST ${DATAPREP_SERVICE_ENDPOINT} \
217+
-H "Content-Type: multipart/form-data" \
218+
-F "files=@./file1.mp4"
219+
# Multiple file upload
220+
curl -X POST ${DATAPREP_SERVICE_ENDPOINT} \
221+
-H "Content-Type: multipart/form-data" \
222+
-F "files=@./file1.mp4" \
223+
-F "files=@./file2.mp4" \
224+
-F "files=@./file3.mp4"
225+
```
226+
227+
Use below method to check and download available videos the microservice. The download endpoint is also used for LVM and UI.
228+
229+
```bash
230+
# List available videos
231+
curl -X 'GET' ${DATAPREP_GET_VIDEO_LIST_ENDPOINT} -H 'accept: application/json'
232+
# Download available video
233+
curl -X 'GET' ${DATAPREP_GET_FILE_ENDPOINT}/video_name.mp4 -H 'accept: application/json'
234+
```
235235

236236
2. Embedding Microservice
237237

238-
```bash
239-
curl http://${host_ip}:6000/v1/embeddings \
240-
-X POST \
241-
-d '{"text":"Sample text"}' \
242-
-H 'Content-Type: application/json'
243-
```
238+
```bash
239+
curl http://${host_ip}:6000/v1/embeddings \
240+
-X POST \
241+
-d '{"text":"Sample text"}' \
242+
-H 'Content-Type: application/json'
243+
```
244244

245245
3. Retriever Microservice
246246

247-
To consume the retriever microservice, you need to generate a mock embedding vector by Python script. The length of embedding vector
248-
is determined by the embedding model.
249-
Here we use the model `openai/clip-vit-base-patch32`, which vector size is 512.
247+
To consume the retriever microservice, you need to generate a mock embedding vector by Python script. The length of embedding vector
248+
is determined by the embedding model.
249+
Here we use the model `openai/clip-vit-base-patch32`, which vector size is 512.
250250

251-
Check the vector dimension of your embedding model, set `your_embedding` dimension equals to it.
251+
Check the vector dimension of your embedding model, set `your_embedding` dimension equals to it.
252252

253-
```bash
254-
export your_embedding=$(python3 -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)")
255-
curl http://${host_ip}:7000/v1/retrieval \
256-
-X POST \
257-
-d "{\"text\":\"test\",\"embedding\":${your_embedding}}" \
258-
-H 'Content-Type: application/json'
259-
```
253+
```bash
254+
export your_embedding=$(python3 -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)")
255+
curl http://${host_ip}:7000/v1/retrieval \
256+
-X POST \
257+
-d "{\"text\":\"test\",\"embedding\":${your_embedding}}" \
258+
-H 'Content-Type: application/json'
259+
```
260260

261261
4. Reranking Microservice
262262

263-
```bash
264-
curl http://${host_ip}:8000/v1/reranking \
265-
-X 'POST' \
266-
-H 'accept: application/json' \
267-
-H 'Content-Type: application/json' \
268-
-d '{
269-
"retrieved_docs": [{"doc": [{"text": "this is the retrieved text"}]}],
270-
"initial_query": "this is the query",
271-
"top_n": 1,
272-
"metadata": [
273-
{"other_key": "value", "video":"top_video_name", "timestamp":"20"}
274-
]
275-
}'
276-
```
263+
```bash
264+
curl http://${host_ip}:8000/v1/reranking \
265+
-X 'POST' \
266+
-H 'accept: application/json' \
267+
-H 'Content-Type: application/json' \
268+
-d '{
269+
"retrieved_docs": [{"doc": [{"text": "this is the retrieved text"}]}],
270+
"initial_query": "this is the query",
271+
"top_n": 1,
272+
"metadata": [
273+
{"other_key": "value", "video":"top_video_name", "timestamp":"20"}
274+
]
275+
}'
276+
```
277277

278278
5. LVM backend Service
279279

280-
In first startup, this service will take times to download the LLM file. After it's finished, the service will be ready.
280+
In first startup, this service will take times to download the LLM file. After it's finished, the service will be ready.
281281

282-
Use `docker logs video-llama-lvm-server` to check if the download is finished.
282+
Use `docker logs video-llama-lvm-server` to check if the download is finished.
283283

284-
```bash
285-
curl -X POST \
286-
"http://${host_ip}:9009/generate?video_url=silence_girl.mp4&start=0.0&duration=9&prompt=What%20is%20the%20person%20doing%3F&max_new_tokens=150" \
287-
-H "accept: */*" \
288-
-d ''
289-
```
284+
```bash
285+
curl -X POST \
286+
"http://${host_ip}:9009/generate?video_url=silence_girl.mp4&start=0.0&duration=9&prompt=What%20is%20the%20person%20doing%3F&max_new_tokens=150" \
287+
-H "accept: */*" \
288+
-d ''
289+
```
290290

291-
> To avoid re-download for the model in case of restart, please see [here](#clean-microservices)
291+
> To avoid re-download for the model in case of restart, see [here](#clean-microservices)
292292
293293
6. LVM Microservice
294294

295-
This service depends on above LLM backend service startup. It will be ready after long time, to wait for them being ready in first startup.
295+
This service depends on above LLM backend service startup. It will be ready after long time, to wait for them being ready in first startup.
296296

297-
```bash
298-
curl http://${host_ip}:9000/v1/lvm\
299-
-X POST \
300-
-d '{"video_url":"https://github.com/DAMO-NLP-SG/Video-LLaMA/raw/main/examples/silence_girl.mp4","chunk_start": 0,"chunk_duration": 7,"prompt":"What is the person doing?","max_new_tokens": 50}' \
301-
-H 'Content-Type: application/json'
302-
```
297+
```bash
298+
curl http://${host_ip}:9000/v1/lvm\
299+
-X POST \
300+
-d '{"video_url":"https://github.com/DAMO-NLP-SG/Video-LLaMA/raw/main/examples/silence_girl.mp4","chunk_start": 0,"chunk_duration": 7,"prompt":"What is the person doing?","max_new_tokens": 50}' \
301+
-H 'Content-Type: application/json'
302+
```
303303

304-
> Please note that the local video file will be deleted after completion to conserve disk space.
304+
> Note that the local video file will be deleted after completion to conserve disk space.
305305
306306
7. MegaService
307307

308-
```bash
309-
curl http://${host_ip}:8888/v1/videoragqna -H "Content-Type: application/json" -d '{
310-
"messages": "What is the man doing?",
311-
"stream": "True"
312-
}'
313-
```
308+
```bash
309+
curl http://${host_ip}:8888/v1/videoragqna -H "Content-Type: application/json" -d '{
310+
"messages": "What is the man doing?",
311+
"stream": "True"
312+
}'
313+
```
314314

315-
> Please note that the megaservice support only stream output.
315+
> Note that the megaservice support only stream output.
316316
317317
## 🚀 Launch the UI
318318

@@ -328,7 +328,7 @@ To access the frontend, open the following URL in your browser: http://{host_ip}
328328
329329
Here is an example of running videoragqna:
330330
331-
![project-screenshot](../../assets/img/video-rag-qna.gif)
331+
![project-screenshot](../../../../assets/img/video-rag-qna.gif)
332332
333333
## Clean Microservices
334334

0 commit comments

Comments
 (0)