test_text_app / app.py
noteldar's picture
Create app.py
65fb958
raw
history blame
224 Bytes
from transformers import pipeline, set_seed
import streamlit as st
generator = pipeline('text-generation', model='gpt2')
set_seed(41)
text = st.text_area('Enter Explanation')
if text:
out = generator(text)
st.json(out)