Random generator
Browse files- RandomAbstract.py +10 -0
RandomAbstract.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
import random
|
3 |
+
import pandas as pd
|
4 |
+
|
5 |
+
def Choose_Random_text():
|
6 |
+
with open("skimlit_example_abstracts.json", "r") as f:
|
7 |
+
example_abstracts = json.load(f)
|
8 |
+
abstracts = pd.DataFrame(example_abstracts)
|
9 |
+
text = random.choice(abstracts.abstract)
|
10 |
+
return text
|