Spaces:
Runtime error
Runtime error
anonymousauthors
commited on
Commit
β’
804eff1
1
Parent(s):
d28cf92
updates
Browse files
pages/2_π_BlackBox_and_WhiteBox_Attacks.py
CHANGED
@@ -219,13 +219,13 @@ if button('Tokenize', key='tokenizer'):
|
|
219 |
if not platform.system().lower() == 'darwin':
|
220 |
generator1 = pipeline('text-generation', model='EleutherAI/gpt-neo-1.3B')
|
221 |
with st.expander('**Original input text**: '+ title):
|
222 |
-
output_openai = get_codex_response(title)
|
223 |
st.markdown(f'The response of GPT-2 with the prompt :blue[{title}]')
|
224 |
st.markdown('<blockquote>' + generator(title, max_length=30, num_return_sequences=1)[0]['generated_text'].replace(title, '', 1) + '</blockquote>', unsafe_allow_html=True)
|
225 |
if not platform.system().lower() == 'darwin':
|
226 |
-
st.markdown(f'The response of
|
227 |
st.markdown('<blockquote>' + generator1(title, do_sample=True, min_length=50)[0]['generated_text'].replace(title, '', 1) + '</blockquote>', unsafe_allow_html=True)
|
228 |
|
|
|
229 |
st.markdown(f'The response of [Codex](https://openai.com/blog/openai-codex/) with the prompt :blue[{title}]')
|
230 |
st.markdown('<blockquote>' + output_openai + '</blockquote>', unsafe_allow_html=True)
|
231 |
|
@@ -260,7 +260,13 @@ if button('Tokenize', key='tokenizer'):
|
|
260 |
st.success(f'We found {restarts} replacements!', icon="β
")
|
261 |
# st.markdown('<br>'.join(outputs), unsafe_allow_html=True)
|
262 |
for i in range(restarts):
|
263 |
-
with st.expander(outputs[i])
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
output_openai = get_codex_response(outputs[i])
|
265 |
st.markdown(f'The response of [Codex](https://openai.com/blog/openai-codex/) with the prompt :blue[{outputs[i]}]')
|
266 |
st.markdown('<blockquote>' + output_openai + '</blockquote>', unsafe_allow_html=True)
|
|
|
219 |
if not platform.system().lower() == 'darwin':
|
220 |
generator1 = pipeline('text-generation', model='EleutherAI/gpt-neo-1.3B')
|
221 |
with st.expander('**Original input text**: '+ title):
|
|
|
222 |
st.markdown(f'The response of GPT-2 with the prompt :blue[{title}]')
|
223 |
st.markdown('<blockquote>' + generator(title, max_length=30, num_return_sequences=1)[0]['generated_text'].replace(title, '', 1) + '</blockquote>', unsafe_allow_html=True)
|
224 |
if not platform.system().lower() == 'darwin':
|
225 |
+
st.markdown(f'The response of EleutherAI/gpt-neo-1.3B with the prompt :blue[{title}]')
|
226 |
st.markdown('<blockquote>' + generator1(title, do_sample=True, min_length=50)[0]['generated_text'].replace(title, '', 1) + '</blockquote>', unsafe_allow_html=True)
|
227 |
|
228 |
+
output_openai = get_codex_response(title)
|
229 |
st.markdown(f'The response of [Codex](https://openai.com/blog/openai-codex/) with the prompt :blue[{title}]')
|
230 |
st.markdown('<blockquote>' + output_openai + '</blockquote>', unsafe_allow_html=True)
|
231 |
|
|
|
260 |
st.success(f'We found {restarts} replacements!', icon="β
")
|
261 |
# st.markdown('<br>'.join(outputs), unsafe_allow_html=True)
|
262 |
for i in range(restarts):
|
263 |
+
with st.expander(outputs[i])
|
264 |
+
st.markdown(f'The response of GPT-2 with the prompt :blue[{outputs[i]}]')
|
265 |
+
st.markdown('<blockquote>' + generator(outputs[i], max_length=30, num_return_sequences=1)[0]['generated_text'].replace(title, '', 1) + '</blockquote>', unsafe_allow_html=True)
|
266 |
+
if not platform.system().lower() == 'darwin':
|
267 |
+
st.markdown(f'The response of EleutherAI/gpt-neo-1.3B with the prompt :blue[{outputs[i]}]')
|
268 |
+
st.markdown('<blockquote>' + generator1(outputs[i], do_sample=True, min_length=50)[0]['generated_text'].replace(title, '', 1) + '</blockquote>', unsafe_allow_html=True)
|
269 |
+
:
|
270 |
output_openai = get_codex_response(outputs[i])
|
271 |
st.markdown(f'The response of [Codex](https://openai.com/blog/openai-codex/) with the prompt :blue[{outputs[i]}]')
|
272 |
st.markdown('<blockquote>' + output_openai + '</blockquote>', unsafe_allow_html=True)
|