Spaces:
Runtime error
Runtime error
Download app.py from Shankarm08/llmademo: direct link, hf CLI and curl.
- Browser
- Download file 341 Bytes
-
https://huggingface.co/spaces/Shankarm08/llmademo/resolve/main/app.py
- Command line
-
hf download hf://spaces/Shankarm08/llmademo/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Shankarm08/llmademo/resolve/main/app.py
341 Bytes
| import hf_api | |
| # Authenticate with Hugging Face | |
| hf_api.set_access_token(None) # Use the default access token | |
| # Load model directly | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B") | |
| model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-8B") |