Spaces:
Runtime error
Runtime error
Antoine Chaffin
commited on
Commit
·
27511bd
1
Parent(s):
013a7fe
simple prompt
Browse files
app.py
CHANGED
@@ -60,10 +60,11 @@ def detect(attacked_text, window_size, method, prompt):
|
|
60 |
return label
|
61 |
|
62 |
def get_prompt(message: str) -> str:
|
63 |
-
texts = [f'<s>[INST] <<SYS>>\n{DEFAULT_SYSTEM_PROMPT}\n<</SYS>>\n\n']
|
64 |
# The first user input is _not_ stripped
|
65 |
-
texts.append(f'{message} [/INST]')
|
66 |
-
return ''.join(texts)
|
|
|
67 |
|
68 |
|
69 |
with gr.Blocks() as demo:
|
|
|
60 |
return label
|
61 |
|
62 |
def get_prompt(message: str) -> str:
|
63 |
+
# texts = [f'<s>[INST] <<SYS>>\n{DEFAULT_SYSTEM_PROMPT}\n<</SYS>>\n\n']
|
64 |
# The first user input is _not_ stripped
|
65 |
+
# texts.append(f'{message} [/INST]')
|
66 |
+
# return ''.join(texts)
|
67 |
+
return f"[INST] {message} [/INST]"
|
68 |
|
69 |
|
70 |
with gr.Blocks() as demo:
|