saidsef commited on
Commit
ac48c85
·
verified ·
1 Parent(s): 816e65f

fix: only download of there is data

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -8,5 +8,7 @@ text = st.text_area("Summarise the following")
8
  if text:
9
  out = pipe(text, do_sample=False)
10
  st.write(out)
11
-
12
- st.download_button("summary download", out[0], file_name="summersation.txt", mime="text/plain")
 
 
 
8
  if text:
9
  out = pipe(text, do_sample=False)
10
  st.write(out)
11
+ stwrite(f"{type(out)}")
12
+
13
+ if len(out) > 100:
14
+ st.download_button("summary download", out, file_name="summersation.txt", mime="text/plain")