Spaces:
Runtime error
Runtime error
alirani
commited on
Commit
•
bcfdb10
1
Parent(s):
47b3556
fix: add button functionality
Browse files
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
|
29 |
-
|
30 |
-
|
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 !')
|