Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from datasets import load_dataset
|
3 |
+
import numpy as np
|
4 |
+
|
5 |
+
index = np.load("index/knn_10752_65.npy")
|
6 |
+
ds = load_dataset("SDBiaseval/identities", split="train")
|
7 |
+
|
8 |
+
def get_nearest_64(ix):
|
9 |
+
return ds.select(index[ix][1:])
|