alirani commited on
Commit
bcfdb10
1 Parent(s): 47b3556

fix: add button functionality

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -25,8 +25,9 @@ prod_title = st.text_input('Type a title to generate a synopsis')
25
 
26
  st.button('Get synopsis')
27
 
28
- if prod_title:
29
- gen_synopsis = generate_synopsis(model, tokenizer, prod_title)
30
- st.text_area(gen_synopsis, disabled=True)
31
-
32
-
 
 
25
 
26
  st.button('Get synopsis')
27
 
28
+ if st.button('Get synopsis'):
29
+ if len(prod_title.split(' ')) > 0:
30
+ gen_synopsis = generate_synopsis(model, tokenizer, prod_title)
31
+ st.text_area(gen_synopsis, disabled=True)
32
+ else:
33
+ st.write('Write a title for the generator to work !')