Download RandomAbstract.py from Vrk/SkimLit: direct link, hf CLI and curl.
- Browser
- Download file 291 Bytes
-
https://huggingface.co/spaces/Vrk/SkimLit/resolve/main/RandomAbstract.py
- Command line
-
hf download hf://spaces/Vrk/SkimLit/RandomAbstract.py
-
curl -L -o RandomAbstract.py https://huggingface.co/spaces/Vrk/SkimLit/resolve/main/RandomAbstract.py
291 Bytes
| import json | |
| import random | |
| import pandas as pd | |
| def Choose_Random_text(): | |
| with open("skimlit_example_abstracts.json", "r") as f: | |
| example_abstracts = json.load(f) | |
| abstracts = pd.DataFrame(example_abstracts) | |
| text = random.choice(abstracts.abstract) | |
| return text |