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

Update app.py

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