cakiki commited on
Commit
20b3e10
·
1 Parent(s): 85c74a6

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
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:])