Spaces:
Sleeping
Sleeping
import streamlit as st | |
import transformers | |
from transformers import pipeline | |
generator = pipeline('text-generation', model='gpt2') | |
text=st.text_input("Enter a text") | |
btn=st.button("Submit") | |
if(text and btn): | |
output=generator(text) | |
st.write(output[0]['generated_text']) |