Skip to content
Snippets Groups Projects
Commit 5a130063 authored by friebolin's avatar friebolin
Browse files

Update imports

parent 375d90b0
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ import os
import pandas as pd
import sklearn
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
metric=evaluate.load("accuracy")
torch.cuda.empty_cache()
......
"""Demo for inference: User enters a sentence and our trained BERT model predicts if the target word is literal or non-literal"""
import sys
sys.path.insert(0, 'Code/')
from Code.preprocess import *
from Code.models import *
from Code.train import *
#import preprocess
#import models
#import train
# from Code.preprocess import *
# from Code.models import *
# from Code.train import *
import Code.preprocess
import Code.models
import Code.train
import json
import torch
from transformers import BertTokenizer, BertModel, BertConfig, BertPreTrainedModel, PreTrainedModel, AutoConfig, AutoModel, AutoTokenizer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment