dakkoong commited on
Commit
739c898
·
1 Parent(s): ffea36f

initial commit

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,12 +1,12 @@
1
  import gradio as gr
2
  from transformers import ViltProcessor, ViltForQuestionAnswering
3
- from transformers import AutoProcessor, AutoModelForVisualQuestionAnswering
4
  from PIL import Image
5
  import torch
6
 
 
 
7
  dataset_name = "Multimodal-Fatima/OK-VQA_train"
8
- model_name = "microsoft/git-base-vqav2"
9
- model_path = "git-base-vqav2"
10
 
11
  questions = ["What can happen the objects shown are thrown on the ground?",
12
  "What was the machine beside the bowl used for?",
 
1
  import gradio as gr
2
  from transformers import ViltProcessor, ViltForQuestionAnswering
3
+ from transformers import AutoProcessor, AutoModelForVisualQuestionAnswering, AutoModelForCausalLM
4
  from PIL import Image
5
  import torch
6
 
7
+ processor = AutoProcessor.from_pretrained("microsoft/git-base-vqav2")
8
+ model = AutoModelForCausalLM.from_pretrained("microsoft/git-base-vqav2")
9
  dataset_name = "Multimodal-Fatima/OK-VQA_train"
 
 
10
 
11
  questions = ["What can happen the objects shown are thrown on the ground?",
12
  "What was the machine beside the bowl used for?",