File size: 423 Bytes
51348d0
f87f969
 
 
 
 
 
 
445e717
 
f87f969
 
 
445e717
f87f969
 
 
 
 
 
 
 
 
51348d0
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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'])