Spaces:
Sleeping
Sleeping
mkw18
commited on
Commit
·
a41ffcc
1
Parent(s):
ec02902
add irrelevant
Browse files
app.py
CHANGED
@@ -68,6 +68,12 @@ def CheckFalse(chatbot, key):
|
|
68 |
chatbot.append((parse_text("否"), parse_text(str(response.content, encoding="utf-8"))))
|
69 |
return chatbot
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
def CheckTerm(chatbot, key):
|
72 |
data = {'AgentFinish': True, 'key': key}
|
73 |
response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
|
@@ -97,6 +103,8 @@ with gr.Blocks() as demo:
|
|
97 |
trueBtn = gr.Button('是')
|
98 |
with gr.Column(scale=1):
|
99 |
falseBtn = gr.Button('否')
|
|
|
|
|
100 |
with gr.Column(scale=1):
|
101 |
termBtn = gr.Button('达到终止条件')
|
102 |
|
|
|
68 |
chatbot.append((parse_text("否"), parse_text(str(response.content, encoding="utf-8"))))
|
69 |
return chatbot
|
70 |
|
71 |
+
def CheckIrrelevant(chatbot, key):
|
72 |
+
data = {'AgentCheck': 'Irrelevant', 'key': key}
|
73 |
+
response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
|
74 |
+
chatbot.append((parse_text("无关"), parse_text(str(response.content, encoding="utf-8"))))
|
75 |
+
return chatbot
|
76 |
+
|
77 |
def CheckTerm(chatbot, key):
|
78 |
data = {'AgentFinish': True, 'key': key}
|
79 |
response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
|
|
|
103 |
trueBtn = gr.Button('是')
|
104 |
with gr.Column(scale=1):
|
105 |
falseBtn = gr.Button('否')
|
106 |
+
with gr.Column(scale=1):
|
107 |
+
falseBtn = gr.Button('无关')
|
108 |
with gr.Column(scale=1):
|
109 |
termBtn = gr.Button('达到终止条件')
|
110 |
|