Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.72 KB

README.md

File metadata and controls

30 lines (25 loc) · 1.72 KB

appl-embedding-visualizer

Interactive visualization of text embeddings

tsne-2

How to use this repo

! This repo is tested on a Windows platform

Preparation

  1. Clone this repo to a folder of your choice
  2. In the root folder, create a file named ".env" and enter your OpenAI API key in the first line of this file in case you want to use the OpenAI API:
    OPENAI_API_KEY="sk-....."
  3. Save and close the .env file
  1. In case you want to use one of the open source models API's that are available on huggingface:
    Enter your Hugging Face API key in the ".env" file :
    HUGGINGFACEHUB_API_TOKEN="hf_....."
  • If you don't have an Hugging Face API key yet, you can register at https://huggingface.co/join
  • When registered and logged in, you can get your API key in your Hugging Face profile settings

Conda virtual environment setup

  1. Open an Anaconda prompt or other command prompt
  2. Go to the root folder of the project and create a Python environment with conda with conda env create -f appl-embedding-visualizer.yml
    NB: The name of the environment is appl-embedding-visualizer by default. It can be changed to a name of your choice in the first line of the file appl-embedding-visualizer.yml
  3. Activate this environment with conda activate appl-embedding-visualizer

Run the application

within the activated conda environment, type python tsne.py