Vrk commited on
Commit
cecc69d
1 Parent(s): 4f67b8b

Random generator

Browse files
Files changed (1) hide show
  1. 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