astrodata / app.py
ronitrai's picture
Update app.py
c388a3e verified
raw
history blame contribute delete
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