lllchenlll commited on
Commit
b86962d
1 Parent(s): eb90fa0

Add application file

Browse files
Files changed (2) hide show
  1. tag_data/cal.py +14 -1
  2. tag_data/tags.txt +0 -0
tag_data/cal.py CHANGED
@@ -2,7 +2,7 @@ import numpy as np
2
  from sentence_transformers import SentenceTransformer
3
 
4
 
5
- encoder = SentenceTransformer("hfl/chinese-roberta-wwm-ext-large")
6
 
7
  tags = []
8
  f = open('tags.txt', 'r')
@@ -20,3 +20,16 @@ with open('./tags_embed.npy', 'wb') as f:
20
 
21
  with open('./tags_dis.npy', 'wb') as f:
22
  np.save(f, tags_dis)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  from sentence_transformers import SentenceTransformer
3
 
4
 
5
+ encoder = SentenceTransformer("./model/")
6
 
7
  tags = []
8
  f = open('tags.txt', 'r')
 
20
 
21
  with open('./tags_dis.npy', 'wb') as f:
22
  np.save(f, tags_dis)
23
+
24
+ # f = open('gpttag.txt', 'r')
25
+ # data = eval(f.readline())
26
+ # f.close()
27
+ #
28
+ # out = ""
29
+ # f = open('tags.txt', 'w')
30
+ # for tmp in data:
31
+ # if tmp[1] > 2:
32
+ # out += tmp[0] + '\n'
33
+ #
34
+ # f.write(out)
35
+ # f.close()
tag_data/tags.txt CHANGED
The diff for this file is too large to render. See raw diff