eaglelandsonce commited on
Commit
bddf6d7
·
verified ·
1 Parent(s): c6eee8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -281,7 +281,7 @@ def crewai_process(research_topic):
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,7 +300,7 @@ with tab1:
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:
@@ -308,12 +308,12 @@ with tab2:
308
  #st.set_page_config(Create Image and Audio Generator', layout='wide')
309
 
310
  # Streamlit sidebar elements
311
- text_block = st.text_area("Enter your text block:")
312
 
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(text_block, 8)
317
  prompts = [' '.join(chunk) for chunk in sentence_chunks]
318
  cols = st.columns(4)
319
  with st.spinner('Generating Content...'):
 
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:
 
308
  #st.set_page_config(Create Image and Audio Generator', layout='wide')
309
 
310
  # Streamlit sidebar elements
311
+ # text_block = st.text_area("Enter your text block:")
312
 
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.session_state.text_block, 8)
317
  prompts = [' '.join(chunk) for chunk in sentence_chunks]
318
  cols = st.columns(4)
319
  with st.spinner('Generating Content...'):