test_text_app / app.py
noteldar's picture
Update app.py
945f7a2
raw
history blame
240 Bytes
from transformers import pipeline
import streamlit as st
generator = pipeline('text-generation', model='gpt2')
# generator = pipeline('sentiment-analysis')
text = st.text_area('Enter Query')
if text:
out = generator(text)
st.json(out)