Update README.md
Browse files
README.md
CHANGED
@@ -36,7 +36,7 @@ Each record in the dataset represents a news article about technology companies
|
|
36 |
|
37 |
|
38 |
## Data Ingestion
|
39 |
-
[Create a free MongoDB Atlas Account](https://www.mongodb.com/cloud/atlas/register?utm_campaign=devrel&utm_source=community&utm_medium=organic_social&utm_content=Hugging%20Face%20Dataset&utm_term=richmond.alake)
|
40 |
|
41 |
```python
|
42 |
import os
|
@@ -61,6 +61,7 @@ dataset = load_dataset("AIatMongoDB/tech-news-embeddings")
|
|
61 |
insert_data = []
|
62 |
|
63 |
# Iterate through the dataset and prepare the documents for insertion
|
|
|
64 |
for item in dataset['train']:
|
65 |
# Convert the dataset item to MongoDB document format
|
66 |
doc_item = json_util.loads(json_util.dumps(item))
|
|
|
36 |
|
37 |
|
38 |
## Data Ingestion
|
39 |
+
[Create a free MongoDB Atlas Account](https://www.mongodb.com/cloud/atlas/register?utm_campaign=devrel&utm_source=community&utm_medium=organic_social&utm_content=Hugging%20Face%20Dataset&utm_term=richmond.alake)
|
40 |
|
41 |
```python
|
42 |
import os
|
|
|
61 |
insert_data = []
|
62 |
|
63 |
# Iterate through the dataset and prepare the documents for insertion
|
64 |
+
# The script below ingests 1000 records into the database at a time
|
65 |
for item in dataset['train']:
|
66 |
# Convert the dataset item to MongoDB document format
|
67 |
doc_item = json_util.loads(json_util.dumps(item))
|