test dataset update
@@ -20,6 +20,28 @@ class TestE2E(unittest.TestCase):
print(df['sentence'], df[['e2e_classes','e2e_confidences']])
+ def test_quick(self):
+ # pipe = nlu.load('embed_sentence.bert')
+ # predictions = pipe.predict(get_sample_pdf(), output_level='document')
+ # print(predictions)
+ p = '/home/loan/Documents/freelancework/jsl/KNOWLEDGE_GRAPH/papaers/test.csv'
+ import pandas as pd
+ df = pd.read_csv(p)
+ # THIS CRASHES WITH USE LAST!!
+ # multi_pipe = nlu.load('en.embed_sentence.electra embed_sentence.bert use', )
+ # multi_pipe = nlu.load('en.embed_sentence.electra embed_sentence.bert use', )
+ multi_pipe = nlu.load('use en.embed_sentence.electra embed_sentence.bert', )
+
+ # res = multi_pipe.predict( get_sample_pdf(), output_level='document')
+ res = multi_pipe.predict(df.Title, output_level='document')
+
+ print(res)
+ print(res.columns)
+
+
+
+
+
if __name__ == '__main__':
unittest.main()
