man08man commited on
Commit
6d480e2
·
verified ·
1 Parent(s): 7a757ea

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +10 -1
index.html CHANGED
@@ -14,4 +14,13 @@ prompt = st.text_input("Describe your image...")
14
  if prompt:
15
  with st.spinner("Generating..."):
16
  image = pipe(prompt).images[0]
17
- st.image(image, caption=prompt, use_column_width=True)
 
 
 
 
 
 
 
 
 
 
14
  if prompt:
15
  with st.spinner("Generating..."):
16
  image = pipe(prompt).images[0]
17
+ st.image(image, caption=prompt, use_column_width=True)
18
+ <button onclick="randomizePrompt()">Surprise Me</button>
19
+
20
+ <script>
21
+ function randomizePrompt() {
22
+ const adjectives = ["cartoon", "realistic", "cyberpunk", "watercolor"];
23
+ const randomAdjective = adjectives[Math.floor(Math.random() * adjectives.length)];
24
+ document.getElementById("prompt").value = `${randomAdjective} dog`;
25
+ }
26
+ </script>