Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -212,12 +212,8 @@ if fetch_data:
|
|
212 |
st.subheader("Suggested Metadata Enhancements")
|
213 |
incomplete_with_desc = incomplete_records[incomplete_records['description'].notnull()]
|
214 |
reference_df = metadata_df[metadata_df['subject'].notnull() & metadata_df['description'].notnull()]
|
215 |
-
|
216 |
-
|
217 |
-
try:
|
218 |
-
tfidf = TfidfVectorizer(stop_words='english')
|
219 |
-
tfidf_matrix = tfidf.fit_transform(filled_descriptions)
|
220 |
-
suggestions = []
|
221 |
for idx, row in incomplete_with_desc.iterrows():
|
222 |
if pd.isna(row['subject']) and pd.notna(row['description']):
|
223 |
desc_vec = tfidf.transform([str(row['description'])])
|
|
|
212 |
st.subheader("Suggested Metadata Enhancements")
|
213 |
incomplete_with_desc = incomplete_records[incomplete_records['description'].notnull()]
|
214 |
reference_df = metadata_df[metadata_df['subject'].notnull() & metadata_df['description'].notnull()]
|
215 |
+
tfidf = TfidfVectorizer(stop_words='english')
|
216 |
+
suggestions = []
|
|
|
|
|
|
|
|
|
217 |
for idx, row in incomplete_with_desc.iterrows():
|
218 |
if pd.isna(row['subject']) and pd.notna(row['description']):
|
219 |
desc_vec = tfidf.transform([str(row['description'])])
|