Kuaaangwen commited on
Commit
16dfa40
1 Parent(s): 62d43a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -19
app.py CHANGED
@@ -10,9 +10,6 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
10
  import torch
11
 
12
 
13
- # Library for keyword extraction
14
- import yake
15
-
16
 
17
  # Load models and tokenisers for both sentence transformers and text classification
18
 
@@ -103,22 +100,6 @@ if sidebar_selectbox == "Compare two sentences":
103
  st.write(text_classification_model.config.id2label[2], ":", round(outputs[0][2].item()*100,2),"%")
104
 
105
 
106
- ### Extract keywords with YAKE ### (might make more sense with word cloud)
107
-
108
- st.subheader("Keywords:")
109
-
110
- kw_extractor = yake.KeywordExtractor(top=10, stopwords=None)
111
- keywords = kw_extractor.extract_keywords(sentence_2)
112
-
113
- # keywords_array = []
114
-
115
- for kw, v in keywords:
116
- # print("Keyphrase: ", kw, ": score", v)
117
- # keywords_array.append(kw)
118
-
119
- st.write(kw)
120
-
121
-
122
 
123
 
124
 
 
10
  import torch
11
 
12
 
 
 
 
13
 
14
  # Load models and tokenisers for both sentence transformers and text classification
15
 
 
100
  st.write(text_classification_model.config.id2label[2], ":", round(outputs[0][2].item()*100,2),"%")
101
 
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
 
105