rhazeljay commited on
Commit
cdeae7d
·
verified ·
1 Parent(s): 6763c5b

added instructions on how to use the app

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -18,14 +18,23 @@ def answer_question(image, question):
18
  st.title("VQA App using BLIP")
19
  st.write("Upload an image and ask a question about it.")
20
 
 
 
 
 
 
 
 
 
 
 
 
21
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])
22
  if uploaded_file is not None:
23
  image = Image.open(uploaded_file).convert("RGB")
24
- st.image(image, caption="Uploaded Image", use_container_width=True)
25
 
26
  question = st.text_input("Ask a question about the image:")
27
  if question:
28
  answer = answer_question(image, question)
29
  st.write(f"**Answer:** {answer}")
30
-
31
-
 
18
  st.title("VQA App using BLIP")
19
  st.write("Upload an image and ask a question about it.")
20
 
21
+ # Instructions Section
22
+ st.header("How to Use the App")
23
+ st.markdown(
24
+ """
25
+ 1. **Upload an image** by clicking the file uploader below.
26
+ 2. **Wait for the image to load.**
27
+ 3. **Type a question** about the image in the input box.
28
+ 4. **Press Enter** and the AI will generate an answer.
29
+ """
30
+ )
31
+
32
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])
33
  if uploaded_file is not None:
34
  image = Image.open(uploaded_file).convert("RGB")
35
+ st.image(image, caption="Uploaded Image", use_column_width=True)
36
 
37
  question = st.text_input("Ask a question about the image:")
38
  if question:
39
  answer = answer_question(image, question)
40
  st.write(f"**Answer:** {answer}")