eaglelandsonce commited on
Commit
c176392
1 Parent(s): 1a915b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -280,7 +280,8 @@ def crewai_process(research_topic):
280
 
281
  st.set_page_config(page_title='Clarifai Story Teller', layout='wide')
282
 
283
- st.secrets["text_block"] =""
 
284
 
285
  # Create tabs
286
  tab1, tab2, tab3 = st.tabs(["Create Your Story Script", "Build Your Image-Audio Book", "Interact with Your Charaters"])
@@ -299,7 +300,7 @@ with tab1:
299
  # Run the crewai process
300
  result = crewai_process(input_topic)
301
  # Display the result
302
- st.secrets["text_block"] = st.text_area("Output", value=result, height=300)
303
 
304
  # Tab 2: Data Visualization
305
  with tab2:
@@ -313,7 +314,7 @@ with tab2:
313
  # Streamlit main page
314
  st.title('Images and Audio with Clarifai')
315
  if st.button("Generate Images and Audio"):
316
- sentence_chunks = split_text_into_sentences_and_chunks(st.secrets["text_block"], 8)
317
  prompts = [' '.join(chunk) for chunk in sentence_chunks]
318
  cols = st.columns(4)
319
  with st.spinner('Generating Content...'):
 
280
 
281
  st.set_page_config(page_title='Clarifai Story Teller', layout='wide')
282
 
283
+
284
+ st.session_state['text_block']=""
285
 
286
  # Create tabs
287
  tab1, tab2, tab3 = st.tabs(["Create Your Story Script", "Build Your Image-Audio Book", "Interact with Your Charaters"])
 
300
  # Run the crewai process
301
  result = crewai_process(input_topic)
302
  # Display the result
303
+ st.session_state['text_block'] = st.text_area("Output", value=result, height=300)
304
 
305
  # Tab 2: Data Visualization
306
  with tab2:
 
314
  # Streamlit main page
315
  st.title('Images and Audio with Clarifai')
316
  if st.button("Generate Images and Audio"):
317
+ sentence_chunks = split_text_into_sentences_and_chunks(st.session_state['text_block'], 8)
318
  prompts = [' '.join(chunk) for chunk in sentence_chunks]
319
  cols = st.columns(4)
320
  with st.spinner('Generating Content...'):