File size: 224 Bytes
65fb958
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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)