File size: 507 Bytes
ae9f0ed
 
172c981
 
ae9f0ed
172c981
 
 
 
 
ae9f0ed
 
 
 
172c981
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import streamlit as st
from transformers import pipeline
from transformers import AutoTokenizer
from transformers import AutoModelForCausalLM



#pipe = pipeline('sentiment-analysis')

pipe = pipeline("text-generation", model="openchat/openchat_3.5")
text = st.text_area('enter some text!')

if text:
    out = pipe(text)
    st.json(out)

#Reference
#GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant: Hi<|end_of_turn|>GPT4 Correct User: How are you today?<|end_of_turn|>GPT4 Correct Assistant: