File size: 1,023 Bytes
5e4257c
7a451cd
 
 
 
8bcd35e
5e4257c
 
7a451cd
5e4257c
 
7a451cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: Code Search Client
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.54.0
app_file: app.py
pinned: false
license: mit
---

# Code Search Client

A Streamlit UI for the [Code Search API](https://huggingface.co/spaces/YOUR_USER/code-search-api).

## Setup

1. Deploy the **Code Search API** Space first (the FastAPI backend).
2. Deploy this Space.
3. Open the app and paste your API Space URL into the sidebar (e.g. `https://your-user-code-search-api.hf.space`).

## Features

| Tab | Description |
|---|---|
| ๐Ÿ” Search | Query any indexed document or project |
| ๐Ÿ“„ Index File | Upload a single source file to index |
| ๐Ÿ“ฆ Batch Index | Upload a whole project (multiple files) under one doc_id |
| ๐Ÿ—‚ Documents | Browse and delete indexed documents |
| ๐Ÿงฎ Embed | Get raw 768-dim embeddings for any text |

## Tip โ€” pre-configure the API URL

Set the `API_URL` environment variable in your Space secrets to pre-fill the sidebar:

```
API_URL=https://your-user-code-search-api.hf.space
```