File size: 1,415 Bytes
f79d011
 
 
 
 
 
2fa27b0
f79d011
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: Embedding Explorer
emoji: πŸ“
colorFrom: purple
colorTo: indigo
sdk: gradio
sdk_version: "6.5.1"
app_file: app.py
pinned: false
---

# Embedding Explorer

Interactive word vector visualization for the Responsible AI course at Huston-Tillotson University.

## Features

- **Explore** β€” Type words, see them in 3D space. Similar words cluster together. Click a word to see its nearest neighbors.
- **Vector Math** β€” Word arithmetic like `king - man + woman β‰ˆ queen`. Results reveal hidden relationships encoded in the vectors.

## Configuration

All examples are configurable via HuggingFace Space environment variables (no code changes needed):

| Variable | Default | Description |
|----------|---------|-------------|
| `EXPLORE_EXAMPLES` | `["dog cat fish car truck", ...]` | JSON list of word groups for Explore tab |
| `ARITHMETIC_EXAMPLES` | `["king - man + woman", ...]` | JSON list of expressions for Vector Math tab |
| `N_NEIGHBORS` | `8` | Number of nearest neighbors to show on click |

## Model

Uses [GloVe](https://nlp.stanford.edu/projects/glove/) (Global Vectors for Word Representation) trained on Wikipedia + Gigaword β€” 400K words, 300 dimensions. Downloaded automatically on first startup via gensim (~376 MB, cached for subsequent runs).

## Course

Responsible AI: Technology, Power, and Justice (COSC-2300A)
Huston-Tillotson University, Spring 2026
Instructor: Chris Hyams