Spaces:
Running
Running
RickMartel
commited on
Commit
•
811c4cd
1
Parent(s):
bf46a21
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
pipe = pipeline(
|
5 |
+
"text-generation", model="RickMartel/GPT2_FineTuned_By_Doc_RAND_v3", device="cpu"
|
6 |
+
)
|
7 |
+
|
8 |
+
|
9 |
+
txt = st.text_area('enter text of a biblical nature')
|
10 |
+
|
11 |
+
if txt:
|
12 |
+
out = pipe(txt, num_return_sequences=1)[0]["generated_text"]
|
13 |
+
st.json(out)
|