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