Skip to content

Latest commit

 

History

History
 
 

demo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Demo of SimCSE

Several demos are available for people to play with our pre-trained SimCSE.

Flask Demo

We provide a simple Web demo based on flask to show how SimCSE can be directly used for information retrieval. The code is based on DensePhrases' repo and demo (a lot of thanks to the authors of DensePhrases). To run this flask demo locally, make sure the SimCSE inference interfaces are setup:

git clone https://github.com/princeton-nlp/SimCSE
cd SimCSE
python setup.py develop

Then you can use run_demo_example.sh to launch the demo. As a default setting, we build the index for 1000 sentences sampled from STS-B dataset. Feel free to build the index of your own corpora. You can also install faiss to speed up the retrieval process.

Gradio Demo

AK391 has provided a Gradio Web Demo of SimCSE to show how the pre-trained models can predict the semantic similarity between two sentences.