Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,7 @@ def le_tagger(content, tag):
|
|
139 |
score = ()
|
140 |
random.seed(time.localtime(time.time())[5]) # 以時間為基礎的隨機種子
|
141 |
tag = tag # 傳進來的標籤英文字串,不含方括號。
|
142 |
-
prompt = get_prompt(content, tag, elements[tag][0]) #
|
143 |
loop_time = time.time()
|
144 |
pipe_result = pipe(prompt, max_new_tokens=1200)
|
145 |
# print(f"Pipe的回應內容:\n{pipe_result[0]['generated_text'].split('標註結果:')[1]}")
|
|
|
139 |
score = ()
|
140 |
random.seed(time.localtime(time.time())[5]) # 以時間為基礎的隨機種子
|
141 |
tag = tag # 傳進來的標籤英文字串,不含方括號。
|
142 |
+
prompt = get_prompt(content, tag, elements[tag][0]) # 將要標註的內文以及提示詞組合成作業提示詞
|
143 |
loop_time = time.time()
|
144 |
pipe_result = pipe(prompt, max_new_tokens=1200)
|
145 |
# print(f"Pipe的回應內容:\n{pipe_result[0]['generated_text'].split('標註結果:')[1]}")
|