Spaces:
Sleeping
Sleeping
Daryl Fung
commited on
Commit
·
e69b90c
1
Parent(s):
dec7ce5
fix bar plot
Browse files
app.py
CHANGED
@@ -38,11 +38,11 @@ def greet(name, descriptions):
|
|
38 |
# run keyword extraction
|
39 |
kw_model = KeyBERT()
|
40 |
keyword_extract(descriptions, kw_model, 1, save_output=f'results/{name}/{1}_keyword.png')
|
41 |
-
keyword_extract(descriptions, kw_model, 2, save_output=f'results/{name}/{2}_keyword.png')
|
42 |
-
keyword_extract(descriptions, kw_model, 3, save_output=f'results/{name}/{3}_keyword.png')
|
43 |
outputs.append(Image.open(f'results/{name}/1_keyword.png'))
|
44 |
-
outputs.append(Image.open(f'results/{name}/2_keyword.png'))
|
45 |
-
outputs.append(Image.open(f'results/{name}/3_keyword.png'))
|
46 |
|
47 |
# keywords = kw_model.extract_keywords(descriptions, highlight=True)
|
48 |
# print(keywords)
|
|
|
38 |
# run keyword extraction
|
39 |
kw_model = KeyBERT()
|
40 |
keyword_extract(descriptions, kw_model, 1, save_output=f'results/{name}/{1}_keyword.png')
|
41 |
+
# keyword_extract(descriptions, kw_model, 2, save_output=f'results/{name}/{2}_keyword.png')
|
42 |
+
# keyword_extract(descriptions, kw_model, 3, save_output=f'results/{name}/{3}_keyword.png')
|
43 |
outputs.append(Image.open(f'results/{name}/1_keyword.png'))
|
44 |
+
# outputs.append(Image.open(f'results/{name}/2_keyword.png'))
|
45 |
+
# outputs.append(Image.open(f'results/{name}/3_keyword.png'))
|
46 |
|
47 |
# keywords = kw_model.extract_keywords(descriptions, highlight=True)
|
48 |
# print(keywords)
|
main.py
CHANGED
@@ -72,8 +72,8 @@ filename.open('w', encoding='utf-8').write(svg)
|
|
72 |
# run keyword extraction
|
73 |
kw_model = KeyBERT()
|
74 |
keyword_extract(doc, kw_model, 1, save_output=f'results/DAD/{1}_keyword.png')
|
75 |
-
keyword_extract(doc, kw_model, 2, save_output=f'results/DAD/{2}_keyword.png')
|
76 |
-
keyword_extract(doc, kw_model, 3, save_output=f'results/DAD/{3}_keyword.png')
|
77 |
keywords = kw_model.extract_keywords(doc, highlight=True)
|
78 |
print(keywords)
|
79 |
|
|
|
72 |
# run keyword extraction
|
73 |
kw_model = KeyBERT()
|
74 |
keyword_extract(doc, kw_model, 1, save_output=f'results/DAD/{1}_keyword.png')
|
75 |
+
# keyword_extract(doc, kw_model, 2, save_output=f'results/DAD/{2}_keyword.png')
|
76 |
+
# keyword_extract(doc, kw_model, 3, save_output=f'results/DAD/{3}_keyword.png')
|
77 |
keywords = kw_model.extract_keywords(doc, highlight=True)
|
78 |
print(keywords)
|
79 |
|