KingZack's picture
adding slider to max lenght
f8b2c59
raw
history blame
566 Bytes
import streamlit as st
from transformers import pipeline
model_location = "KingZack/future-futurama-maker"
pipe = pipeline("text-generation", model=model_location)
text = st.text_area('Give me ideas to generate a new Futurama episode...')
value = st.slider("How long of a response do you want. The longer the much more time it takes",
min_value=69, max_value=4444, value=100)
if text:
generated_response_object = pipe(text, max_length=600)
actual_response = generated_response_object[0]['generated_text']
st.text(actual_response)