neiths commited on
Commit
bef8931
1 Parent(s): 37346c1

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __main__ import initalize_models, load_projection_module, projection_module
2
+
3
+ tokenizer, model, vision_model, processor = initialize_models()
4
+ projection_module = load_projection_module()
5
+
6
+ img = st.file_uploader("image: ")
7
+ text = st.text_area("text: ")
8
+
9
+ ans = answer_question(
10
+ img,
11
+ tokenizer,
12
+ model,
13
+ vision_model,
14
+ processor,
15
+ projection_module,
16
+ )
17
+
18
+ st.json(ans)
19
+