Spaces:
Sleeping
Sleeping
Shakshi3104
commited on
Commit
·
060c381
1
Parent(s):
aa3d8fa
[update] update README and others
Browse files- README.md +5 -36
- compose.yml +1 -1
- requirements.txt +0 -1
README.md
CHANGED
@@ -1,51 +1,20 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
-
title: Cobalt
|
4 |
sdk: gradio
|
5 |
-
emoji:
|
6 |
colorFrom: blue
|
7 |
colorTo: indigo
|
8 |
pinned: false
|
9 |
---
|
10 |
|
11 |
-
# Cobalt
|
12 |
|
13 |
-
Cobalt is a demo app for
|
14 |
-
|
15 |
-
## Demo
|
16 |
-
This demo app is made by Gradio, deployed to [Hugging Face Space](https://huggingface.co/spaces/Shakshi3104/Cobalt).
|
17 |
-
|
18 |
-
On local, you can run this app below:
|
19 |
-
|
20 |
-
```bash
|
21 |
-
docker compose up --build
|
22 |
-
```
|
23 |
-
and, access to http://localhost:7860/
|
24 |
-
|
25 |
-

|
26 |
-
|
27 |
-
## Usage
|
28 |
-
|
29 |
-
```python
|
30 |
-
import pandas as pd
|
31 |
-
from model.search.hybrid import HybridSearchClient
|
32 |
-
|
33 |
-
# load documents from CSV file.
|
34 |
-
df = pd.read_csv("corpus.csv")
|
35 |
-
|
36 |
-
# Initialize search client
|
37 |
-
# Specify column name to be searched. e.g. "content"
|
38 |
-
search_client = HybridSearchClient.from_dataframe(df, "content")
|
39 |
-
|
40 |
-
# Search documents from a query
|
41 |
-
results = search_client.search_top_n("Arashi's history")
|
42 |
-
|
43 |
-
```
|
44 |
|
45 |
## Requirements
|
46 |
|
47 |
- Python 3.10
|
48 |
-
- rank_bm25
|
49 |
- huggingface
|
50 |
-
-
|
51 |
- Other Python packages are refer to [requirements.txt](./requirements.txt)
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
title: Cobalt DuckDB
|
4 |
sdk: gradio
|
5 |
+
emoji: 🦆
|
6 |
colorFrom: blue
|
7 |
colorTo: indigo
|
8 |
pinned: false
|
9 |
---
|
10 |
|
11 |
+
# Cobalt DuckDB
|
12 |
|
13 |
+
Cobalt is a demo app for vector search using [Ruri](https://huggingface.co/cl-nagoya/ruri-large) and DuckDB. The repository is a demo app similar to [cobalt-hybrid-search](https://github.com/Shakshi3104/cobalt-hybrid-search).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
## Requirements
|
16 |
|
17 |
- Python 3.10
|
|
|
18 |
- huggingface
|
19 |
+
- duckdb
|
20 |
- Other Python packages are refer to [requirements.txt](./requirements.txt)
|
compose.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
services:
|
2 |
cobalt:
|
3 |
-
container_name: cobalt-
|
4 |
build:
|
5 |
context: .
|
6 |
dockerfile: Dockerfile
|
|
|
1 |
services:
|
2 |
cobalt:
|
3 |
+
container_name: cobalt-duckdb
|
4 |
build:
|
5 |
context: .
|
6 |
dockerfile: Dockerfile
|
requirements.txt
CHANGED
@@ -10,7 +10,6 @@ python-dotenv
|
|
10 |
|
11 |
# Visualization
|
12 |
gradio
|
13 |
-
streamlit
|
14 |
|
15 |
tqdm>=4.65
|
16 |
matplotlib>=3.7
|
|
|
10 |
|
11 |
# Visualization
|
12 |
gradio
|
|
|
13 |
|
14 |
tqdm>=4.65
|
15 |
matplotlib>=3.7
|