Spaces:
Sleeping
Sleeping
import streamlit as st | |
from transformers import pipeline | |
# Add a title | |
st.title('GPT Detection Demo') | |
# Add 4 options for 4 models | |
option = st.sidebar.selectbox( | |
'Which pipeline do you want to use?', | |
('sentiment-analysis'), | |
) | |
pipe = pipeline(option) | |
text = st.text_area('Enter text here', 'Type here') | |
if st.button('Generate'): | |
st.write(pipe(text)[0]['generated_text']) | |