Skip to content

Commit

Permalink
updated init.py and created a file for an example
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisomala committed Jul 9, 2024
1 parent a5a41f4 commit 152a99e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion connectors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

atlas_dataset = huggingface_connecter.load('aaa/bbb')

atlas_dataset.create_index(...)
atlas_dataset.create_index(topic_model=True, embedding_model='NomicEmbed')

print("Atlas dataset has been loaded and indexed successfully.")
9 changes: 9 additions & 0 deletions connectors/example_usage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from nomic.connectors import huggingface_connecter

# Example source url: https://huggingface.co/datasets/allenai/quartz
#Takes last two parts of url to get allenai/quartz
atlas_dataset = huggingface_connecter.load('allenai/quartz')

atlas_dataset.create_index(topic_model=True, embedding_model='NomicEmbed')

print("Atlas dataset has been loaded and indexed successfully.")

0 comments on commit 152a99e

Please sign in to comment.