GPT2_4_Bible / app.py
RickMartel's picture
Create app.py
811c4cd verified
raw
history blame
309 Bytes
import streamlit as st
from transformers import pipeline
pipe = pipeline(
"text-generation", model="RickMartel/GPT2_FineTuned_By_Doc_RAND_v3", device="cpu"
)
txt = st.text_area('enter text of a biblical nature')
if txt:
out = pipe(txt, num_return_sequences=1)[0]["generated_text"]
st.json(out)