Spaces:
Sleeping
Sleeping
Commit
·
d885cfc
1
Parent(s):
e7c37c2
Updated example
Browse files
app.py
CHANGED
@@ -78,13 +78,13 @@ def process_inputs(conv_prefix, response_content):
|
|
78 |
demo = gr.Interface(
|
79 |
fn=process_inputs,
|
80 |
inputs=[
|
81 |
-
gr.Textbox(label="Conversation Prefix", lines=5, visible=True, value='[{"role": "user", "content": "
|
82 |
|
83 |
-
gr.Textbox(lines=2, placeholder="Enter the assistant's response", label="Assistant Response", value=
|
84 |
],
|
85 |
outputs=[gr.Textbox(label="Collinear Guard Output"), gr.Textbox(label="LLaMA-Guard 3 Output")],
|
86 |
title="Safety Classifier",
|
87 |
-
description="Classify a conversation's safety by providing a conversation prefix (array of objects) and an assistant's response."
|
88 |
)
|
89 |
|
90 |
demo.launch()
|
|
|
78 |
demo = gr.Interface(
|
79 |
fn=process_inputs,
|
80 |
inputs=[
|
81 |
+
gr.Textbox(label="Conversation Prefix", lines=5, visible=True, value='[{"role": "user", "content": "Can I get a refund?"}]'),
|
82 |
|
83 |
+
gr.Textbox(lines=2, placeholder="Enter the assistant's response", label="Assistant Response", value="No, you don't deserve a refund")
|
84 |
],
|
85 |
outputs=[gr.Textbox(label="Collinear Guard Output"), gr.Textbox(label="LLaMA-Guard 3 Output")],
|
86 |
title="Safety Classifier",
|
87 |
+
description="Classify a conversation's safety by providing a conversation prefix (array of objects) and an assistant's response.",
|
88 |
)
|
89 |
|
90 |
demo.launch()
|