fix
Browse files1. added spinner to indicate images generating
2. Removed Prompts Display
app.py
CHANGED
@@ -122,7 +122,6 @@ if audio_file:
|
|
122 |
|
123 |
# Image prompts - generated once translation is available
|
124 |
if st.session_state.translation:
|
125 |
-
st.write("### Image Prompts")
|
126 |
|
127 |
# Determine whether to use translation or transcription for image generation
|
128 |
prompts = []
|
@@ -132,15 +131,11 @@ if audio_file:
|
|
132 |
else:
|
133 |
prompts = get_image_prompts(st.session_state.translation)['image_prompts']
|
134 |
|
135 |
-
# Display the prompts
|
136 |
-
for i, prompt in enumerate(prompts):
|
137 |
-
st.write(f"**Prompt {i+1}:** {prompt}")
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
st.write(f"Generated from: {prompt}")
|
144 |
|
145 |
st.info("Video Generation Feature Currently Under Development")
|
146 |
# # Generate the video based on the images and translation
|
|
|
122 |
|
123 |
# Image prompts - generated once translation is available
|
124 |
if st.session_state.translation:
|
|
|
125 |
|
126 |
# Determine whether to use translation or transcription for image generation
|
127 |
prompts = []
|
|
|
131 |
else:
|
132 |
prompts = get_image_prompts(st.session_state.translation)['image_prompts']
|
133 |
|
|
|
|
|
|
|
134 |
|
135 |
+
# Show spinner while generating images
|
136 |
+
with st.spinner("Generating images..."):
|
137 |
+
for prompt, image_path in generate_images(prompts):
|
138 |
+
st.image(image_path, caption=f"{prompt}", use_column_width=True)
|
|
|
139 |
|
140 |
st.info("Video Generation Feature Currently Under Development")
|
141 |
# # Generate the video based on the images and translation
|