import streamlit as st import pandas as pd # from txtai.embeddings import Embeddings # import gdown import os from PIL import Image search_image = Image.open('images/Search.png') browse_image = Image.open('images/Browse.png') st.set_page_config(layout="wide", page_title="AAAI24 Obstinate Adversarial Examples") # with open('style.css') as f: # st.markdown(f'', unsafe_allow_html=True) st.title("Finding Obstinate Adversarial Examples") # st.sidebar.markdown("### This webpage serves as an illustration of an anonymous submission to ACL 23.") st.markdown('This webpage serves as an illustration of an anonymous submission to AAAI 24.') st.markdown('### What do we offer?') st.markdown('We present two methods for searching Obstinate Adversarial Examples. The first method is a direct search using the "📙 Dictionary (Search)" option, while the second method, "📖 Dictionary (Browse)", involves browsing words that have already been found to have obstinate substitutions. ' 'Additionally, we also provide a tool for finding Obstinate Adversarial Examples in a black-box manner.') st.markdown('#### How to use "📙 Dictionary (Search)"?') st.markdown("By entering a word you want to find its obstinate substitutions, you can view the word's meaning in English, all the obstinate substitutions we have discovered for it, and examples. " "The hyperlinks sometimes might not work due to the contained property of Hugging Face space.") st.image(search_image, caption='A search example.') st.markdown('#### How to use "📖 Dictionary (Browse)"?') st.markdown('By clicking on the initial letters (A to Z, numbers, and other characters), you can view all the words whose obstinate substitutions have been discovered and that begin with the selected initial. By clicking on a word, you will be redirected to the search page, where you can view information about the selected word.') st.image(browse_image, caption='A browse example.') st.markdown('#### How to use "😈 Blackbox Attack"?') st.markdown('We offer two methods for generating replacement words using obstinate substitutions. Detailed introduction can be found on the page.') st.markdown('### Models and datasets.') st.markdown('On this page, we present the obstinate substitutions we discovered using ALBERT, DistillBERT, and Roberta models and data from the GLUE (MRPC), SNLI, and SQuAD datasets.') st.markdown('### Ethics statements for this webpage') st.markdown('We present obstinate substitutions discovered using our proposed algorithms. ' 'Our experiments utilize publicly available NLP and cross-modal datasets and leverage pre-trained language models. ' 'We do not believe that our code or methods raise concerns regarding discrimination, bias, fairness, inappropriate potential applications, impact, privacy and security issues, legal compliance, research integrity, or research practice. ' 'However, the datasets and models used may contain biases that may be inherited by the models we use.')