You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Initialize the streamlit app to create a simple text box interface for text input and output summary
import streamlit as st
import openai
import os
from functions import summarize
st.title("Text Summarizer")
try:
openai.api_key = os.getenv('OPENAI_KEY') # set key per instructions available at https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
assert openai.api_key , "missing key"
# initialize state variable
if "summary" not in st.session_state:
st.session_state["summary"] = ""
# define text input area for the streamlit app
input_text = st.text_area(label="Enter full text:", value="", height=250)