VinitT commited on
Commit
cb920c0
·
verified ·
1 Parent(s): 0f94df2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -12
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
- if all_output_texts:
128
- st.write("Generate story")
129
- generate_story_button = st.button("Generate Story", key="generate_story")
130
-
131
- if generate_story_button:
132
- story = generate_story(all_output_texts)
133
- st.write("Generated Story:")
134
- st.write(story)
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()