Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -118,20 +118,16 @@ def main():
|
|
118 |
st.write(description)
|
119 |
all_output_texts.append(description)
|
120 |
|
121 |
-
# Clear memory after processing each file
|
122 |
-
del image
|
123 |
-
torch.cuda.empty_cache()
|
124 |
-
torch.manual_seed(0)
|
125 |
st.write("Description of all images:")
|
126 |
st.write(all_output_texts)
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
|
136 |
if __name__ == "__main__":
|
137 |
main()
|
|
|
118 |
st.write(description)
|
119 |
all_output_texts.append(description)
|
120 |
|
|
|
|
|
|
|
|
|
121 |
st.write("Description of all images:")
|
122 |
st.write(all_output_texts)
|
123 |
+
if all_output_texts:
|
124 |
+
st.write("Generate story")
|
125 |
+
generate_story_button = st.button("Generate Story", key="generate_story")
|
126 |
+
|
127 |
+
if generate_story_button:
|
128 |
+
story = generate_story(all_output_texts)
|
129 |
+
st.write("Generated Story:")
|
130 |
+
st.write(story)
|
131 |
|
132 |
if __name__ == "__main__":
|
133 |
main()
|