Download app.py from ronitrai/astrodata: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/spaces/ronitrai/astrodata/resolve/main/app.py
- Command line
-
hf download hf://spaces/ronitrai/astrodata/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ronitrai/astrodata/resolve/main/app.py
369 Bytes
| import streamlit as st | |
| from transformers import AutoTokenizer, FalconModel | |
| import torch | |
| tokenizer = AutoTokenizer.from_pretrained("Rocketknight1/falcon-rw-1b") | |
| model = FalconModel.from_pretrained("Rocketknight1/falcon-rw-1b") | |
| inputs = tokenizer("Hello, my dog is cute", return_tensors="pt") | |
| outputs = model(**inputs) | |
| last_hidden_states = outputs.last_hidden_state | |