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)