SauronLee commited on
Commit
a87018d
·
1 Parent(s): 48a7419

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def clean_str(string,use=True):
29
  title_list = np.load("./title_list.npy", allow_pickle=True).tolist()
30
  data_path = os.path.join('..', 'data')
31
  device = 'cpu'
32
- vec_inuse = json.load(open('/Users/sauron/Desktop/Code/Finding-NLP-Papers/finding_papers_gradio/data/papers_embedding_inuse.json'))
33
  vocab = list(vec_inuse)
34
  vocab_size = len(vocab) + 2
35
  word2index = dict()
@@ -63,7 +63,7 @@ def data2index(data_x, word2index):
63
  def greet(paper_str):
64
  pred_list = []
65
 
66
- model = torch.load("saved.model",map_location = torch.device('cpu'))
67
  model.eval()
68
 
69
 
 
29
  title_list = np.load("./title_list.npy", allow_pickle=True).tolist()
30
  data_path = os.path.join('..', 'data')
31
  device = 'cpu'
32
+ vec_inuse = json.load(open('./papers_embedding_inuse.json'))
33
  vocab = list(vec_inuse)
34
  vocab_size = len(vocab) + 2
35
  word2index = dict()
 
63
  def greet(paper_str):
64
  pred_list = []
65
 
66
+ model = torch.load("saved.model")
67
  model.eval()
68
 
69