Update my_model/KBVQA.py
Browse files- my_model/KBVQA.py +2 -0
my_model/KBVQA.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import torch
|
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
4 |
from typing import Optional
|
5 |
from my_model.captioner.image_captioning import ImageCaptioningModel
|
@@ -20,6 +21,7 @@ class KBVQA():
|
|
20 |
self.captioner = None
|
21 |
self.detector = None
|
22 |
self.kbvqa_model = None
|
|
|
23 |
# self.kbvqa_model_loaded = self.all_models_loaded()
|
24 |
|
25 |
|
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
+
import os
|
4 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
5 |
from typing import Optional
|
6 |
from my_model.captioner.image_captioning import ImageCaptioningModel
|
|
|
21 |
self.captioner = None
|
22 |
self.detector = None
|
23 |
self.kbvqa_model = None
|
24 |
+
self.access_token = os.getenv("HUGGINGFACE_TOKEN")
|
25 |
# self.kbvqa_model_loaded = self.all_models_loaded()
|
26 |
|
27 |
|