You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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
38
37
39
38
- Python environment (>= 3.9 version) with packages such as `numpy`, `openai`, `pymongo`, `python-dotenv`, `azure-core`, `azure-cosmos`, `tenacity`, and `gradio`.
40
39
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.
42
41
43
42
## Running the Script
44
43
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(
82
81
api_version=openai.api_version,
83
82
azure_endpoint=openai.api_base
84
83
)
85
-
86
84
```
87
85
88
86
## Solution architecture
@@ -216,7 +214,7 @@ db.command(
216
214
## Insert data to the collection
217
215
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.
218
216
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.
0 commit comments