{"id":17772960,"url":"https://github.com/radames/sentence-embeddings-visualization","last_synced_at":"2025-10-10T06:18:57.548Z","repository":{"id":46040387,"uuid":"462789531","full_name":"radames/sentence-embeddings-visualization","owner":"radames","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-23T15:31:25.000Z","size":80,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-13T06:58:56.684Z","etag":null,"topics":["embeddings","huggingface","observablehq","transformers","visualization"],"latest_commit_sha":null,"homepage":"https://huggingface.co/spaces/radames/sentence-embeddings-visualization","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radames.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-23T15:17:54.000Z","updated_at":"2023-04-02T14:37:22.000Z","dependencies_parsed_at":"2022-07-18T17:00:32.722Z","dependency_job_id":null,"html_url":"https://github.com/radames/sentence-embeddings-visualization","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/radames/sentence-embeddings-visualization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radames%2Fsentence-embeddings-visualization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radames%2Fsentence-embeddings-visualization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radames%2Fsentence-embeddings-visualization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radames%2Fsentence-embeddings-visualization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radames","download_url":"https://codeload.github.com/radames/sentence-embeddings-visualization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radames%2Fsentence-embeddings-visualization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002970,"owners_count":26083488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embeddings","huggingface","observablehq","transformers","visualization"],"created_at":"2024-10-26T21:41:46.256Z","updated_at":"2025-10-10T06:18:57.532Z","avatar_url":"https://github.com/radames.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: Sentence Embeddings Visualization\nemoji: 📈\ncolorFrom: green\ncolorTo: indigo\nsdk: gradio\napp_file: app.py\npinned: false\n---\n\n# Hugging Face Spaces + Observable\n### Sentence Embeddings Visualization\n\nRecently I've been exploring [Hugging face Spaces](https://huggingface.co/spaces) and [sentence-transformers](https://huggingface.co/sentence-transformers) to build an application to generate text embeddings and clustering visualization.\n\nCurrently, the quickest way to build interactive ML apps with Python (backend/frontend), afaik, is to use [Streamlit](https://streamlit.io/) or [Gradio](https://www.gradio.app/). To embed an Observable notebook on Streamlit, you can use this custom component [streamlit-observable](https://github.com/asg017/streamlit-observable) \n\nThis [Observable notebook](https://observablehq.com/@radames/hugging-face-spaces-observable-sentence-embeddings) is the frontend application for this [Hugging Face Spaces](https://huggingface.co/spaces/radames/sentence-embeddings-visualization) app.\n\nThis notebook explores another way to integrate Observable inside Hugging Face Spaces. Currently,  [HF Spaces supports](https://huggingface.co/docs/hub/spaces#streamlit-and-gradio) Streamlit and Gradio or a simple static web page. \n\nThe concept here is to use this entire notebook as the frontend and data visualization application for the [ML Flask/Python](https://huggingface.co/spaces/radames/sentence-embeddings-visualization/blob/main/app.py#L37-L75) backend.\n\n* The index route renders a [simple HTML template](https://huggingface.co/spaces/radames/sentence-embeddings-visualization/blob/main/templates/index.html) containing [Observable Runtime API code](https://observablehq.com/@observablehq/downloading-and-embedding-notebooks).\n* A single function, triggered by a POST request to \\`run-umap\\`, returns a low dimensional representation of the original sentence transformers embeddings using UMAP and cluster analysis with HDBSCAN.\n* All the visualization and interactive magic happen on the Javascript code inside the Observable Notebook.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradames%2Fsentence-embeddings-visualization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradames%2Fsentence-embeddings-visualization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradames%2Fsentence-embeddings-visualization/lists"}