ml-playground / app.py
Sasidhar's picture
Update app.py
b58c818
raw
history blame
379 Bytes
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)