updated imports
This commit is contained in:
@@ -2,7 +2,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from database import VisualCommunication
|
from core.database.classes import VisualCommunication
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ from __future__ import annotations
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from database import connect
|
|
||||||
from database import get_visual_communication
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
from core.database import connect
|
||||||
|
from core.database import get_visual_communication
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# prepare env vars
|
# prepare env vars
|
||||||
env_path = Path(__file__).parent.parent / 'local.env'
|
env_path = Path(__file__).parent.parent / 'local.env'
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ from __future__ import annotations
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from database import connect
|
|
||||||
from database import VisualCommunication
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
from core.database import connect
|
||||||
|
from core.database.classes import VisualCommunication
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# prepare env vars
|
# prepare env vars
|
||||||
env_path = Path(__file__).parent.parent / 'local.env'
|
env_path = Path(__file__).parent.parent / 'local.env'
|
||||||
|
|||||||
@@ -3,11 +3,12 @@ from __future__ import annotations
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from database import connect
|
|
||||||
from database import VisualCommunication
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from pymongo.errors import DuplicateKeyError
|
from pymongo.errors import DuplicateKeyError
|
||||||
|
|
||||||
|
from core.database import connect
|
||||||
|
from core.database.classes import VisualCommunication
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# get list of image paths
|
# get list of image paths
|
||||||
test_dir = Path(__file__).parent
|
test_dir = Path(__file__).parent
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ from pathlib import Path
|
|||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from pymongo.errors import DuplicateKeyError
|
from pymongo.errors import DuplicateKeyError
|
||||||
|
|
||||||
from src.database import connect
|
from core.database import connect
|
||||||
from src.database import VisualCommunication
|
from core.database import VisualCommunication
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# get list of image paths
|
# get list of image paths
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from database import ModelOutputs
|
from core.dto import ModelData
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# instantiate data object
|
# instantiate data object
|
||||||
vis_com_list = [
|
vis_com_list = [
|
||||||
ModelOutputs.from_random()
|
ModelData.from_random()
|
||||||
for i
|
for i
|
||||||
in range(3)
|
in range(3)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ import logging
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from database import connect
|
|
||||||
from database import upsert_predictions
|
|
||||||
from database import VisualCommunication
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
from core.database import connect
|
||||||
|
from core.database import upsert_predictions
|
||||||
|
from core.database.classes import VisualCommunication
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# setup logging
|
# setup logging
|
||||||
fmt = (
|
fmt = (
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ from __future__ import annotations
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from database import connect
|
|
||||||
from database import total_annotated
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
from core.database import connect
|
||||||
|
from core.database import total_documents
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# prepare env vars
|
# prepare env vars
|
||||||
env_path = Path(__file__).parent.parent / 'local.env'
|
env_path = Path(__file__).parent.parent / 'local.env'
|
||||||
@@ -16,5 +17,7 @@ if __name__ == '__main__':
|
|||||||
# connect to database
|
# connect to database
|
||||||
collection, db, client = connect()
|
collection, db, client = connect()
|
||||||
# get visual communication
|
# get visual communication
|
||||||
num_docs = total_annotated(collection)
|
num_docs = total_documents(
|
||||||
|
collection=collection,
|
||||||
|
)
|
||||||
print(f"number of annotated documents in database: {num_docs}")
|
print(f"number of annotated documents in database: {num_docs}")
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ from __future__ import annotations
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from database import connect
|
|
||||||
from database import total_documents
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
from core.database import connect
|
||||||
|
from core.database import total_documents
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# prepare env vars
|
# prepare env vars
|
||||||
env_path = Path(__file__).parent.parent / 'local.env'
|
env_path = Path(__file__).parent.parent / 'local.env'
|
||||||
@@ -16,5 +17,7 @@ if __name__ == '__main__':
|
|||||||
# connect to database
|
# connect to database
|
||||||
collection, db, client = connect()
|
collection, db, client = connect()
|
||||||
# get visual communication
|
# get visual communication
|
||||||
num_docs = total_documents(collection)
|
num_docs = total_documents(
|
||||||
|
collection=collection,
|
||||||
|
)
|
||||||
print(f"total number of documents in database: {num_docs}")
|
print(f"total number of documents in database: {num_docs}")
|
||||||
|
|||||||
Reference in New Issue
Block a user