Download Text from ravishka123/TextGeneration: direct link, hf CLI and curl.
- Browser
- Download file 277 Bytes
-
https://huggingface.co/ravishka123/TextGeneration/resolve/main/Text
- Command line
-
hf download hf://ravishka123/TextGeneration/Text
-
curl -L -o Text https://huggingface.co/ravishka123/TextGeneration/resolve/main/Text
277 Bytes
| from transformers import pipeline | |
| # Model load කරන්න | |
| generator = pipeline("text-generation", | |
| model="gpt2") | |
| # Text generate කරන්න | |
| result = generator("Sri Lanka is", | |
| max_length=50) | |
| print(result[0]['generated_text']) |