From 91f215a3b43f72c42c10c4c457dc80ac2301bcc8 Mon Sep 17 00:00:00 2001 From: eldpswp99 Date: Thu, 2 Nov 2023 18:42:38 +0900 Subject: [PATCH] fix import --- ml/review/model.py | 2 +- ml/review/predict.py | 4 ++-- ml/review/train.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ml/review/model.py b/ml/review/model.py index 9c68979..62fefa7 100644 --- a/ml/review/model.py +++ b/ml/review/model.py @@ -3,7 +3,7 @@ from torch import nn from torch.utils.data import Dataset -from review.tokenization import BERTSentenceTransform +from tokenization import BERTSentenceTransform class BERTClassifier(nn.Module): diff --git a/ml/review/predict.py b/ml/review/predict.py index a627e18..674e6bf 100644 --- a/ml/review/predict.py +++ b/ml/review/predict.py @@ -2,10 +2,10 @@ import numpy as np import torch from kobert_tokenizer import KoBERTTokenizer -from review.model import BERTDataset +from model import BERTDataset device = torch.device("cuda" if torch.cuda.is_available() else "cpu") -PATH = "" +PATH = "../model" def predict(predict_sentence): diff --git a/ml/review/train.py b/ml/review/train.py index 9c19bc4..0b8d486 100644 --- a/ml/review/train.py +++ b/ml/review/train.py @@ -9,7 +9,7 @@ from transformers import AdamW, BertModel from transformers.optimization import get_cosine_schedule_with_warmup -from review.model import BERTClassifier, BERTDataset +from model import BERTClassifier, BERTDataset data = pd.read_csv("review_data.csv")