Pedro Cuenca commited on
Commit
588c97c
1 Parent(s): b5619d2

fix: prevent empty search when Again is tapped and the field is empty.

Browse files
Files changed (1) hide show
  1. app/app.py +1 -1
app/app.py CHANGED
@@ -41,7 +41,7 @@ prompt = st.text_input("What do you want to see?")
41
  #TODO: I think there's an issue where we can't run twice the same inference (not due to caching) - may need to use st.form
42
 
43
  DEBUG = False
44
- if prompt != "" or st.session_state.get("again", False):
45
  container = st.empty()
46
  container.markdown(f"Generating predictions for: **{prompt}**")
47
 
 
41
  #TODO: I think there's an issue where we can't run twice the same inference (not due to caching) - may need to use st.form
42
 
43
  DEBUG = False
44
+ if prompt != "" or (st.session_state.get("again", False) and prompt != ""):
45
  container = st.empty()
46
  container.markdown(f"Generating predictions for: **{prompt}**")
47