vishalkatheriya commited on
Commit
7db4531
·
verified ·
1 Parent(s): 13bcb7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,7 +5,7 @@ if 'has_run' not in st.session_state:
5
  st.session_state.has_run = False
6
 
7
  # Main UI container
8
- st.sidebar.markdown('<h3>VQA</h3>', unsafe_allow_html=True)
9
  # Image upload area
10
  uploaded_image = st.sidebar.file_uploader("Upload your image here", type=["jpg", "jpeg", "png"])
11
  # Display the uploaded image and process it if available
@@ -15,9 +15,9 @@ if uploaded_image is not None:
15
  # Task prompt input
16
  task_prompt = st.sidebar.text_input("Task Prompt", value="Describe the image in detail:")
17
  # Additional text input (optional)
18
- text_input = st.sidebar.text_area("Input Questions", height=50)
19
  # Generate Caption button
20
- if st.button("Generate Caption", key="Generate") and not st.session_state.has_run:
21
  # Mark that the script has been run
22
  st.session_state.has_run = True
23
  st.write(task_prompt,"\n\n",text_input)
 
5
  st.session_state.has_run = False
6
 
7
  # Main UI container
8
+ st.markdown('<h3><center><b>VQA</b></center></h3>', unsafe_allow_html=True)
9
  # Image upload area
10
  uploaded_image = st.sidebar.file_uploader("Upload your image here", type=["jpg", "jpeg", "png"])
11
  # Display the uploaded image and process it if available
 
15
  # Task prompt input
16
  task_prompt = st.sidebar.text_input("Task Prompt", value="Describe the image in detail:")
17
  # Additional text input (optional)
18
+ text_input = st.sidebar.text_area("Input Questions", height=20)
19
  # Generate Caption button
20
+ if st.sidebar.button("Generate Caption", key="Generate") and not st.session_state.has_run:
21
  # Mark that the script has been run
22
  st.session_state.has_run = True
23
  st.write(task_prompt,"\n\n",text_input)