surkovvv commited on
Commit
6566083
1 Parent(s): 96169e2

Update back.py

Browse files
Files changed (1) hide show
  1. back.py +2 -2
back.py CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
2
  import numpy as np
3
  import torch
4
 
5
- from typing import TypeVar
6
  from transformers import DistilBertTokenizer
7
 
8
 
@@ -42,7 +42,7 @@ label_mapping = {
42
  }
43
 
44
 
45
- def load_setup(path_to_model: str, path_to_vocab: str) -> tuple[ModelType, TokenizerType]:
46
  loaded_model = torch.load(path_to_model, map_location=device)
47
  loaded_tokenizer = DistilBertTokenizer(path_to_vocab)
48
  return loaded_model, loaded_tokenizer
 
2
  import numpy as np
3
  import torch
4
 
5
+ from typing import TypeVar, Tuple
6
  from transformers import DistilBertTokenizer
7
 
8
 
 
42
  }
43
 
44
 
45
+ def load_setup(path_to_model: str, path_to_vocab: str) -> Tuple[ModelType, TokenizerType]:
46
  loaded_model = torch.load(path_to_model, map_location=device)
47
  loaded_tokenizer = DistilBertTokenizer(path_to_vocab)
48
  return loaded_model, loaded_tokenizer