Spaces:
Runtime error
Runtime error
Download app.py from bryanpinheiro/test: direct link, hf CLI and curl.
- Browser
- Download file 431 Bytes
-
https://huggingface.co/spaces/bryanpinheiro/test/resolve/main/app.py
- Command line
-
hf download hf://spaces/bryanpinheiro/test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/bryanpinheiro/test/resolve/main/app.py
431 Bytes
| # Use a pipeline as a high-level helper | |
| from transformers import pipeline | |
| messages = [ | |
| {"role": "user", "content": "Who are you?"}, | |
| ] | |
| pipe = pipeline("text-generation", model="microsoft/Phi-3.5-mini-instruct", trust_remote_code=True) | |
| output = pipe( | |
| messages, | |
| past_length=0, # Example: starting with an empty cache | |
| max_cache_length=1024, # Example: allow up to 1024 tokens in the cache | |
| ) | |
| print(output) |