Spaces:
Runtime error
Runtime error
thepolymerguy
commited on
Commit
•
18f4e61
1
Parent(s):
e4b13fb
Update tridentmodel/classification.py
Browse files
tridentmodel/classification.py
CHANGED
@@ -225,17 +225,3 @@ def broad_scope_class_predictor(class_embeddings, abstract_embedding, N=5, Sensi
|
|
225 |
print(HighestSimilarity)
|
226 |
print(GreenLikelihood)
|
227 |
return predictions, HighestSimilarity, GreenLikelihood
|
228 |
-
|
229 |
-
|
230 |
-
########## LOADING PRE-COMPUTED EMBEDDINGS ##########
|
231 |
-
class_embeddings = pd.read_csv('Embeddings/MainClassEmbeddings.csv')
|
232 |
-
|
233 |
-
abstract = """
|
234 |
-
Described herein are strength characteristics and biodegradation of articles produced using one or more “green” sustainable polymers and one or more carbohydrate-based polymers. A compatibilizer can optionally be included in the article. In some cases, the article can include a film, a bag, a bottle, a cap or lid therefore, a sheet, a box or other container, a plate, a cup, utensils, or the like.
|
235 |
-
"""
|
236 |
-
abstract= clean_data(abstract, type='String')
|
237 |
-
abstract_embedding = sentence_embedder(abstract, Model_Path)
|
238 |
-
Number = 10
|
239 |
-
broad_scope_predictions = broad_scope_class_predictor(class_embeddings, abstract_embedding, Number, Sensitivity='High')
|
240 |
-
|
241 |
-
print(broad_scope_class_predictor)
|
|
|
225 |
print(HighestSimilarity)
|
226 |
print(GreenLikelihood)
|
227 |
return predictions, HighestSimilarity, GreenLikelihood
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|