thepolymerguy commited on
Commit
9420ba3
1 Parent(s): 61c7a4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -35,6 +35,19 @@ model = LLaMAForCausalLM.from_pretrained(
35
  )
36
  '''
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  def generateresponse(history):
40
  """
@@ -211,19 +224,6 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
211
 
212
  """)
213
 
214
- """
215
- ########## LOADING PRE-COMPUTED EMBEDDINGS ##########
216
- class_embeddings = pd.read_csv('Embeddings/MainClassEmbeddings.csv')
217
-
218
- abstract = """
219
- #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.
220
- """
221
- abstract= clean_data(abstract, type='String')
222
- abstract_embedding = sentence_embedder(abstract, Model_Path)
223
- Number = 10
224
- broad_scope_predictions = broad_scope_class_predictor(class_embeddings, abstract_embedding, Number, Sensitivity='High')
225
 
226
- print(broad_scope_class_predictor)
227
- """
228
 
229
  demo.launch()
 
35
  )
36
  '''
37
 
38
+ ########## LOADING PRE-COMPUTED EMBEDDINGS ##########
39
+ class_embeddings = pd.read_csv('Embeddings/MainClassEmbeddings.csv')
40
+
41
+ abstract = """
42
+ #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.
43
+ """
44
+
45
+ abstract= classification.clean_data(abstract, type='String')
46
+ abstract_embedding = classification.sentence_embedder(abstract, Model_Path)
47
+ Number = 10
48
+ broad_scope_predictions = classification.broad_scope_class_predictor(class_embeddings, abstract_embedding, Number, Sensitivity='High')
49
+
50
+ print(broad_scope_class_predictor)
51
 
52
  def generateresponse(history):
53
  """
 
224
 
225
  """)
226
 
 
 
 
 
 
 
 
 
 
 
 
227
 
 
 
228
 
229
  demo.launch()