Skip to content

Commit

Permalink
instantiation issue solved
Browse files Browse the repository at this point in the history
  • Loading branch information
saanikat committed Sep 13, 2024
1 parent 22d91cb commit 70ab6c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bedms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def data_encoding(
X_values_embeddings = embeddings
if schema == "ENCODE":
# Bag of Words Vectorizer
vectorizer = CountVectorizer()
vectorizer = None
vc_path = hf_hub_download(
repo_id=REPO_ID,
filename=ENCODE_VECTORIZER_FILENAME,
Expand All @@ -202,7 +202,7 @@ def data_encoding(
# print(transformed_columns)
X_values_bow = transformed_columns
# Label Encoding
label_encoder = LabelEncoder()
label_encoder =None
lb_path = hf_hub_download(
repo_id=REPO_ID,
filename=ENCODE_LABEL_ENCODER_FILENAME,
Expand All @@ -211,7 +211,7 @@ def data_encoding(
label_encoder = pickle.load(f)

elif schema == "FAIRTRACKS":
vectorizer = CountVectorizer()
vectorizer = None
vc_path = hf_hub_download(
repo_id=REPO_ID, filename=FAIRTRACKS_VECTORIZER_FILENAME
)
Expand All @@ -226,7 +226,7 @@ def data_encoding(
# print(transformed_columns)
X_values_bow = transformed_columns
# Label Encoding
label_encoder = LabelEncoder()
label_encoder = None
lb_path = hf_hub_download(
repo_id=REPO_ID,
filename=FAIRTRACKS_LABEL_ENCODER_FILENAME,
Expand All @@ -235,7 +235,7 @@ def data_encoding(
label_encoder = pickle.load(f)

elif schema == "BEDBASE":
vectorizer = CountVectorizer()
vectorizer = None
vc_path = hf_hub_download(repo_id=REPO_ID, filename=BEDBASE_VECTORIZER_FILENAME)
with open(vc_path, "rb") as f:
vectorizer = pickle.load(f)
Expand All @@ -248,7 +248,7 @@ def data_encoding(
# print(transformed_columns)
X_values_bow = transformed_columns
# Label Encoding
label_encoder = LabelEncoder()
label_encoder = None
lb_path = hf_hub_download(
repo_id=REPO_ID,
filename=BEDBASE_LABEL_ENCODER_FILENAME,
Expand Down

0 comments on commit 70ab6c0

Please sign in to comment.