JBDef commited on
Commit
aaed869
1 Parent(s): 4372c9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,17 +1,17 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
- question = pipeline("visual-question-answering" , model="JBDef/finetuned_yelp")
5
  def main():
6
  st.title("Visual Question Answering")
7
 
8
- with st.form("questionaire"):
9
  file = st.file_uploader("Upload image", type=["jpg", "png"])
10
  text = st.text_area('enter some question:')
11
  # clicked==True only when the button is clicked
12
  clicked = st.form_submit_button("Submit")
13
  if clicked:
14
- results = question(str(file) , str(text))
15
  st.json(results)
16
 
17
  if __name__ == "__main__":
 
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
+ question = pipeline("visual-question-answering")
5
  def main():
6
  st.title("Visual Question Answering")
7
 
8
+ with st.form("text_field"):
9
  file = st.file_uploader("Upload image", type=["jpg", "png"])
10
  text = st.text_area('enter some question:')
11
  # clicked==True only when the button is clicked
12
  clicked = st.form_submit_button("Submit")
13
  if clicked:
14
+ results = question(file , text)
15
  st.json(results)
16
 
17
  if __name__ == "__main__":