updated imports
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from shared.dto import ModelData
|
||||
from shared.mongodb.classes import ModelData
|
||||
|
||||
if __name__ == '__main__':
|
||||
# instantiate data object
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ from tqdm import tqdm
|
||||
from utils import DEVICE, VCDADataset, load_model
|
||||
|
||||
from shared.data_store import connect_minio
|
||||
from shared.dto import ModelData
|
||||
from shared.mongodb.classes import ModelData
|
||||
from shared.utils import setup_logging
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from torch import nn
|
||||
|
||||
from shared.dto import ModelData
|
||||
from shared.mongodb.classes import ModelData
|
||||
|
||||
from .angle import AngleTail
|
||||
from .contact import ContactTail
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
"""Database module content."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .classes.dataset import Dataset
|
||||
from .classes.visual_communication import VisualCommunication
|
||||
from .utils.connect_mongodb import connect_mongodb
|
||||
from .utils.count_documents import count_documents
|
||||
from .utils.get_visual_communication import get_visual_communication
|
||||
|
||||
@@ -13,7 +13,7 @@ from pydantic import BaseModel, ConfigDict
|
||||
from pymongo.collection import Collection
|
||||
|
||||
from shared.data_store import get, put
|
||||
from shared.dto import ModelData
|
||||
from shared.mongodb.classes import ModelData
|
||||
|
||||
|
||||
class VisualCommunication(BaseModel):
|
||||
|
||||
@@ -6,7 +6,7 @@ import logging
|
||||
|
||||
from pymongo.collection import Collection
|
||||
|
||||
from shared.mongodb import VisualCommunication
|
||||
from shared.mongodb.classes import VisualCommunication
|
||||
from shared.mongodb.exceptions import NoDocumentFoundException
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import logging
|
||||
|
||||
from pymongo.collection import Collection
|
||||
|
||||
from shared.dto import ModelData
|
||||
from shared.mongodb.classes import ModelData
|
||||
|
||||
|
||||
def upsert_annotation(
|
||||
|
||||
@@ -4,7 +4,7 @@ import logging
|
||||
|
||||
from pymongo.collection import Collection
|
||||
|
||||
from shared.dto import ModelData
|
||||
from shared.mongodb.classes import ModelData
|
||||
|
||||
|
||||
def upsert_prediction(
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from pymongo.collection import Collection
|
||||
|
||||
from shared.mongodb import VisualCommunication
|
||||
from shared.mongodb.classes import VisualCommunication
|
||||
|
||||
|
||||
def upsert_visual_communication(
|
||||
|
||||
@@ -13,14 +13,9 @@ from pydantic import ValidationError
|
||||
from pymongo.collection import Collection
|
||||
|
||||
from shared.data_store import delete as delete_from_minio
|
||||
from shared.dto import ModelData
|
||||
from shared.mongodb import (
|
||||
NoDocumentFoundException,
|
||||
VisualCommunication,
|
||||
count_documents,
|
||||
get_visual_communication,
|
||||
upsert_annotation,
|
||||
)
|
||||
from shared.mongodb import count_documents, get_visual_communication, upsert_annotation
|
||||
from shared.mongodb.classes import ModelData, VisualCommunication
|
||||
from shared.mongodb.exceptions import NoDocumentFoundException
|
||||
|
||||
from .layout import app_layout
|
||||
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import dash_mantine_components as dmc
|
||||
from dash import dcc
|
||||
from dash import html
|
||||
from dash import dcc, html
|
||||
|
||||
from shared.dto import AngleData
|
||||
from shared.dto import ContactData
|
||||
from shared.dto import DistanceData
|
||||
from shared.dto import FramingData
|
||||
from shared.dto import InformationValueData
|
||||
from shared.dto import ModalityColorData
|
||||
from shared.dto import ModalityDepthData
|
||||
from shared.dto import ModalityLightingData
|
||||
from shared.dto import PointOfViewData
|
||||
from shared.dto import SalienceData
|
||||
from shared.dto import VisualSyntaxData
|
||||
from shared.mongodb.classes import (
|
||||
AngleData,
|
||||
ContactData,
|
||||
DistanceData,
|
||||
FramingData,
|
||||
InformationValueData,
|
||||
ModalityColorData,
|
||||
ModalityDepthData,
|
||||
ModalityLightingData,
|
||||
PointOfViewData,
|
||||
SalienceData,
|
||||
VisualSyntaxData,
|
||||
)
|
||||
|
||||
|
||||
def generate_visual_syntax_options_map():
|
||||
@@ -54,54 +55,63 @@ experiential_map = generate_visual_syntax_options_map()
|
||||
experiential_container = dmc.Col(
|
||||
children=[
|
||||
html.H4('experiential'.title()),
|
||||
], span=5,
|
||||
],
|
||||
span=5,
|
||||
)
|
||||
for title, options in experiential_map.items():
|
||||
id_dict = {'type': 'annotation', 'index': title.replace('_', '-')}
|
||||
experiential_container.children.append(
|
||||
dmc.Container([
|
||||
dmc.Container(
|
||||
[
|
||||
html.B(title.title()),
|
||||
dcc.RadioItems(
|
||||
options=[text.replace('_', ' ') for text in options],
|
||||
id=id_dict,
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
)
|
||||
# prepare interpersonal container
|
||||
interpersonal_map = generate_interpersonal_options_map()
|
||||
interpersonal_container = dmc.Col(
|
||||
children=[
|
||||
html.H4('interpersonal'.title()),
|
||||
], span=3,
|
||||
],
|
||||
span=3,
|
||||
)
|
||||
for title, options in interpersonal_map.items():
|
||||
id_dict = {'type': 'annotation', 'index': title.replace('_', '-')}
|
||||
interpersonal_container.children.append(
|
||||
dmc.Container([
|
||||
dmc.Container(
|
||||
[
|
||||
html.B(title.title()),
|
||||
dcc.RadioItems(
|
||||
options=[text.replace('_', ' ') for text in options],
|
||||
id=id_dict,
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
)
|
||||
# prepare textual container
|
||||
textual_map = generate_textual_options_map()
|
||||
textual_container = dmc.Col(
|
||||
children=[
|
||||
html.H4('textual'.title()),
|
||||
], span=4,
|
||||
],
|
||||
span=4,
|
||||
)
|
||||
for title, options in textual_map.items():
|
||||
id_dict = {'type': 'annotation', 'index': title.replace('_', '-')}
|
||||
textual_container.children.append(
|
||||
dmc.Container([
|
||||
dmc.Container(
|
||||
[
|
||||
html.B(title.title()),
|
||||
dcc.RadioItems(
|
||||
options=[text.replace('_', ' ') for text in options],
|
||||
id=id_dict,
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
labels_element = dmc.Grid(
|
||||
|
||||
Reference in New Issue
Block a user