Ankitajadhav commited on
Commit
91b2664
·
verified ·
1 Parent(s): 1ab12bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -46,11 +46,11 @@ class VectorStore:
46
  self.collection = self.chroma_client.create_collection(name=collection_name)
47
 
48
  # Method to populate the vector store with embeddings from a dataset
49
- def populate_vectors(self, dataset, batch_size=100):
50
  # Use dataset streaming
51
  #dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train[:1500]', streaming=True)
52
  dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train')
53
- dataset = dataset.select(range(500)) # Select the first 1500 examples
54
 
55
  texts = []
56
  i = 0 # Initialize index
@@ -92,7 +92,7 @@ vector_store.populate_vectors(dataset=None)
92
  def fine_tune_model():
93
  # Load your dataset
94
  dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train')
95
- dataset = dataset.select(range(500)) # Select the first 1500 examples
96
 
97
  # Prepare the data for training
98
  def tokenize_function(examples):
 
46
  self.collection = self.chroma_client.create_collection(name=collection_name)
47
 
48
  # Method to populate the vector store with embeddings from a dataset
49
+ def populate_vectors(self, dataset, batch_size=10):
50
  # Use dataset streaming
51
  #dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train[:1500]', streaming=True)
52
  dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train')
53
+ dataset = dataset.select(range(50)) # Select the first 1500 examples
54
 
55
  texts = []
56
  i = 0 # Initialize index
 
92
  def fine_tune_model():
93
  # Load your dataset
94
  dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train')
95
+ dataset = dataset.select(range(50)) # Select the first 1500 examples
96
 
97
  # Prepare the data for training
98
  def tokenize_function(examples):