broadfield-dev commited on
Commit
13e80a3
·
verified ·
1 Parent(s): c26f5f4

Update database.py

Browse files
Files changed (1) hide show
  1. database.py +2 -1
database.py CHANGED
@@ -4,11 +4,12 @@ from parser import parse_python_code
4
  import os
5
  from sklearn.metrics.pairwise import cosine_similarity
6
  import numpy as np
 
7
 
8
  # User-configurable variables
9
  DB_NAME = "python_programs" # ChromaDB collection name
10
  HF_DATASET_NAME = "python_program_vectors" # Hugging Face Dataset name
11
- HF_TOKEN = "YOUR_HUGGINGFACE_TOKEN" # Replace with your Hugging Face API token
12
  PERSIST_DIR = "./chroma_data" # Directory for persistent storage (optional)
13
 
14
  def init_chromadb(persist_dir=PERSIST_DIR):
 
4
  import os
5
  from sklearn.metrics.pairwise import cosine_similarity
6
  import numpy as np
7
+ import dotenv
8
 
9
  # User-configurable variables
10
  DB_NAME = "python_programs" # ChromaDB collection name
11
  HF_DATASET_NAME = "python_program_vectors" # Hugging Face Dataset name
12
+ HF_TOKEN = os.getenv("HF_KEY") # Replace with your Hugging Face API token
13
  PERSIST_DIR = "./chroma_data" # Directory for persistent storage (optional)
14
 
15
  def init_chromadb(persist_dir=PERSIST_DIR):