Spaces:
Runtime error
Runtime error
text gen concept
Browse files
app.py
CHANGED
|
@@ -1,9 +1,18 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
|
|
|
|
|
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
text = st.text_area('enter some text!')
|
| 6 |
|
| 7 |
if text:
|
| 8 |
out = pipe(text)
|
| 9 |
-
st.json(out)
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
+
from transformers import AutoTokenizer
|
| 4 |
+
from transformers import AutoModelForCausalLM
|
| 5 |
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
#pipe = pipeline('sentiment-analysis')
|
| 9 |
+
|
| 10 |
+
pipe = pipeline("text-generation", model="openchat/openchat_3.5")
|
| 11 |
text = st.text_area('enter some text!')
|
| 12 |
|
| 13 |
if text:
|
| 14 |
out = pipe(text)
|
| 15 |
+
st.json(out)
|
| 16 |
+
|
| 17 |
+
#Reference
|
| 18 |
+
#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:
|