Spaces:
Runtime error
Runtime error
File size: 379 Bytes
b58c818 1256a85 b58c818 1256a85 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import transformers
import streamlit as st
from transformers import AutoTokenizer, AutoModelWithLMHead
tokenizer = AutoTokenizer.from_pretrained("gpt2-large")
@st.cache
def load_model(model_name):
model = AutoModelWithLMHead.from_pretrained("gpt2-large")
return model
model = load_model("gpt2-large")
x = st.slider('Select a value')
st.write(x, 'squared is', x * x) |