Download app.py from haniyehhh/test: direct link, hf CLI and curl.
- Browser
- Download file 345 Bytes
-
https://huggingface.co/spaces/haniyehhh/test/resolve/main/app.py
- Command line
-
hf download hf://spaces/haniyehhh/test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/haniyehhh/test/resolve/main/app.py
345 Bytes
| from transformers import pipeline | |
| generator = pipeline( | |
| "text-generation", | |
| model="CohereLabs/tiny-aya-base", | |
| torch_dtype="bfloat16", | |
| ) | |
| output = generator( | |
| "The capital of Spain is", | |
| max_new_tokens=128, | |
| do_sample=True, | |
| temperature=0.1, | |
| top_p=0.9, | |
| repetition_penalty=1.1, | |
| ) | |
| print(output[0]["generated_text"]) | |