boris commited on
Commit
bbc3a60
2 Parent(s): 0aab987 588c97c

Merge pull request #49 from borisdayma/demo-improvements

Browse files

Demo improvements

Former-commit-id: 7056f09fc923be47655b15c9c3de4f3e3017afaa

Files changed (1) hide show
  1. app/app.py +2 -2
app/app.py CHANGED
@@ -29,7 +29,7 @@ DALL·E mini is an AI model that generates images from any prompt you give!
29
 
30
  <p style='text-align: center'>
31
  Created by Boris Dayma et al. 2021
32
- <a href="https://github.com/borisdayma/dalle-mini">GitHub</a> | <a href="https://wandb.ai/dalle-mini/dalle-mini/reports/DALL-E-mini--Vmlldzo4NjIxODA">Report</a>
33
  </p>
34
  """, unsafe_allow_html=True)
35
 
@@ -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
 
 
29
 
30
  <p style='text-align: center'>
31
  Created by Boris Dayma et al. 2021
32
+ <a href="https://github.com/borisdayma/dalle-mini">GitHub</a> | <a href="https://wandb.ai/dalle-mini/dalle-mini/reports/DALL-E-mini--Vmlldzo4NjIxODA">Project Report</a>
33
  </p>
34
  """, unsafe_allow_html=True)
35
 
 
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