beyond commited on
Commit
1234f41
1 Parent(s): 62091f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
4
 
5
  auth_token = os.environ.get("access_token")
6
  pipeline_en = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-qa-detector-distil",use_auth_token=auth_token)
7
- pipeline_en = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-qa-detector-chinese",use_auth_token=auth_token)
8
 
9
 
10
 
@@ -13,7 +13,7 @@ def predict_en(q,a):
13
  return res['label'],res['score']
14
 
15
  def predict_zh(q,a):
16
- res = pipeline_en({"text":q, "text_pair":a})
17
  return res['label'],res['score']
18
 
19
 
 
4
 
5
  auth_token = os.environ.get("access_token")
6
  pipeline_en = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-qa-detector-distil",use_auth_token=auth_token)
7
+ pipeline_zh = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-qa-detector-chinese",use_auth_token=auth_token)
8
 
9
 
10
 
 
13
  return res['label'],res['score']
14
 
15
  def predict_zh(q,a):
16
+ res = pipeline_zh({"text":q, "text_pair":a})
17
  return res['label'],res['score']
18
 
19