Spaces:
Build error
Build error
OxbridgeEconomics
commited on
Commit
·
0f23641
1
Parent(s):
4e18ce3
commit
Browse files
controllers/vectorizer.py
CHANGED
@@ -147,7 +147,9 @@ def vectorize(article):
|
|
147 |
Returns:
|
148 |
None
|
149 |
"""
|
150 |
-
|
|
|
|
|
151 |
documents_list = documents_to_list_of_dicts(docs)
|
152 |
for doc in documents_list:
|
153 |
upsert(doc, collection)
|
|
|
147 |
Returns:
|
148 |
None
|
149 |
"""
|
150 |
+
df = pd.DataFrame(article)
|
151 |
+
df = df[['id','site','title','titleCN','contentCN','category','author','content','subtitle','publishDate','link','attachment','sentimentScore','sentimentLabel']]
|
152 |
+
docs = split_documents(df)
|
153 |
documents_list = documents_to_list_of_dicts(docs)
|
154 |
for doc in documents_list:
|
155 |
upsert(doc, collection)
|