eaglelandsonce
commited on
Commit
•
2c96fb3
1
Parent(s):
36e9fb3
Update app.py
Browse files
app.py
CHANGED
@@ -279,6 +279,9 @@ def crewai_process(research_topic):
|
|
279 |
if 'text_block' not in st.session_state:
|
280 |
st.session_state['text_block'] = ''
|
281 |
|
|
|
|
|
|
|
282 |
st.set_page_config(page_title='Clarifai Story Teller', layout='wide')
|
283 |
|
284 |
|
@@ -293,7 +296,7 @@ with tab1:
|
|
293 |
|
294 |
# Input for the user
|
295 |
input_topic = st.text_area("Input Topic", height=100, placeholder="Input Topic...")
|
296 |
-
|
297 |
# Button to run the process
|
298 |
if st.button("Run"):
|
299 |
# Run the crewai process
|
@@ -316,7 +319,7 @@ with tab2:
|
|
316 |
cols = st.columns(4)
|
317 |
with st.spinner('Generating Content...'):
|
318 |
for i, prompt in enumerate(prompts):
|
319 |
-
image, img_error = generate_image(prompt)
|
320 |
audio, audio_error = generate_audio(prompt)
|
321 |
|
322 |
with cols[i % 4]:
|
|
|
279 |
if 'text_block' not in st.session_state:
|
280 |
st.session_state['text_block'] = ''
|
281 |
|
282 |
+
if 'on_topic' not in st.session_state:
|
283 |
+
st.session_state['on_topic'] = ''
|
284 |
+
|
285 |
st.set_page_config(page_title='Clarifai Story Teller', layout='wide')
|
286 |
|
287 |
|
|
|
296 |
|
297 |
# Input for the user
|
298 |
input_topic = st.text_area("Input Topic", height=100, placeholder="Input Topic...")
|
299 |
+
st.session_state['on_topic'] = input_topic
|
300 |
# Button to run the process
|
301 |
if st.button("Run"):
|
302 |
# Run the crewai process
|
|
|
319 |
cols = st.columns(4)
|
320 |
with st.spinner('Generating Content...'):
|
321 |
for i, prompt in enumerate(prompts):
|
322 |
+
image, img_error = generate_image(prompt+st.session_state.on_topic )
|
323 |
audio, audio_error = generate_audio(prompt)
|
324 |
|
325 |
with cols[i % 4]:
|