|
|
|
|
|
import streamlit as st |
|
import torch |
|
import bitsandbytes |
|
import accelerate |
|
import scipy |
|
import copy |
|
from PIL import Image |
|
import torch.nn as nn |
|
import pandas as pd |
|
from my_model.object_detection import detect_and_draw_objects |
|
from my_model.captioner.image_captioning import get_caption |
|
from my_model.gen_utilities import free_gpu_resources |
|
from my_model.KBVQA import KBVQA, prepare_kbvqa_model |
|
from my_model.utilities.st_utils import UIManager, StateManager |
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
ui_manager = UIManager() |
|
selection = ui_manager.display_sidebar() |
|
ui_manager.display_selected_page(selection) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
main() |