Skip to content

Commit bcf515e

Browse files
committed
Update AI-ad-gen.md
1 parent 87f1cd6 commit bcf515e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

articles/cosmos-db/mongodb/vcore/AI-ad-gen.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ms.service: cosmos-db
99
ms.subservice: mongodb-vcore
1010
ms.topic: demonstration
1111
ms.date: 03/12/2024
12-
zone_pivot_groups: azure-cosmos-db-apis-nosql-mongodb
1312
---
1413

1514
# AI-Enhanced Advertisement Generation using Azure Cosmos DB for MongoDB vCore
@@ -38,7 +37,7 @@ In this guide, we demonstrate how to create dynamic advertising content that res
3837

3938
- Python environment (>= 3.9 version) with packages such as `numpy`, `openai`, `pymongo`, `python-dotenv`, `azure-core`, `azure-cosmos`, `tenacity`, and `gradio`.
4039

41-
<!-- - Download the [data file](https://github.com/jayanta-mondal/ignite-demo/blob/main/data/shoes_with_vectors.json) and save it in a designated data folder. -->
40+
- Download the [data file](https://github.com/jayanta-mondal/ignite-demo/blob/main/data/shoes_with_vectors.json) and save it in a designated data folder.
4241

4342
## Running the Script
4443
Before we dive into the exciting part of generating AI-enhanced advertisements, we need to set up our environment. This setup involves installing the necessary packages to ensure our script runs smoothly. Here’s a step-by-step guide to get everything ready.
@@ -82,7 +81,6 @@ client = AzureOpenAI(
8281
api_version=openai.api_version,
8382
azure_endpoint=openai.api_base
8483
)
85-
8684
```
8785

8886
## Solution architecture
@@ -216,7 +214,7 @@ db.command(
216214
## Insert data to the collection
217215
Now insert the inventory data, which includes descriptions and their corresponding vector embeddings, into the newly created collection. To insert data into our collection, we use the `insert_many()` method provided by the `pymongo` library. The method allows us to insert multiple documents into the collection at once. Our data is stored in a JSON file, which we'll load and then insert into the database.
218216

219-
<!-- Download the [shoes_with_vectors.json](https://github.com/jayanta-mondal/ignite-demo/blob/main/data/shoes_with_vectors.json) file from the GitHub repository and store it in a `data` directory within your project folder. -->
217+
Download the [shoes_with_vectors.json](https://github.com/jayanta-mondal/ignite-demo/blob/main/data/shoes_with_vectors.json) file from the GitHub repository and store it in a `data` directory within your project folder.
220218

221219
```
222220
data_file = open(file="./data/shoes_with_vectors.json", mode="r")

0 commit comments

Comments
 (0)