startrz commited on
Commit
0697206
·
verified ·
1 Parent(s): 34c0423

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -52,9 +52,12 @@ def main():
52
  }
53
  )
54
 
55
- # Add a question to the payload if needed
56
- if st.text_input("Enter your question", "Can you describe the image?"):
57
- payload["question"] = st.text_input("Enter your question", "Can you describe the image?")
 
 
 
58
 
59
  # Send the request to the API and get the output
60
  if st.button("Submit"):
 
52
  }
53
  )
54
 
55
+ # Add a question to the payload with a unique key
56
+ question = st.text_input("Enter your question", "Can you describe the image?", key="question_input")
57
+
58
+ # Add the question to the payload if provided
59
+ if question:
60
+ payload["question"] = question
61
 
62
  # Send the request to the API and get the output
63
  if st.button("Submit"):