Spaces:
Runtime error
Runtime error
Commit
·
d42374c
1
Parent(s):
e9c923a
makes predictions on ctrl/cmd + enter
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ with st.spinner("Loading model..."):
|
|
| 27 |
text = st.text_area('Enter text here:')
|
| 28 |
submit = st.button('Predict')
|
| 29 |
|
| 30 |
-
if submit:
|
| 31 |
|
| 32 |
prediction = pipe(text)[0]
|
| 33 |
prediction = sort_predictions(prediction)
|
|
|
|
| 27 |
text = st.text_area('Enter text here:')
|
| 28 |
submit = st.button('Predict')
|
| 29 |
|
| 30 |
+
if submit or len(text) > 0:
|
| 31 |
|
| 32 |
prediction = pipe(text)[0]
|
| 33 |
prediction = sort_predictions(prediction)
|