Spaces:
Sleeping
Sleeping
Upload data_processing.py
Browse files- data_processing.py +3 -1
data_processing.py
CHANGED
@@ -76,11 +76,13 @@ def create_faiss_index(dataset):
|
|
76 |
|
77 |
def load_ragbench():
|
78 |
global ragbench
|
79 |
-
ragbench
|
|
|
80 |
for dataset in ['covidqa', 'cuad', 'delucionqa', 'emanual', 'expertqa',
|
81 |
'finqa', 'hagrid', 'hotpotqa', 'msmarco', 'pubmedqa',
|
82 |
'tatqa', 'techqa']:
|
83 |
ragbench[dataset] = load_dataset("rungalileo/ragbench", dataset)
|
|
|
84 |
|
85 |
def load_faiss(query_dataset):
|
86 |
global index
|
|
|
76 |
|
77 |
def load_ragbench():
|
78 |
global ragbench
|
79 |
+
if ragbench is not None:
|
80 |
+
return ragbench
|
81 |
for dataset in ['covidqa', 'cuad', 'delucionqa', 'emanual', 'expertqa',
|
82 |
'finqa', 'hagrid', 'hotpotqa', 'msmarco', 'pubmedqa',
|
83 |
'tatqa', 'techqa']:
|
84 |
ragbench[dataset] = load_dataset("rungalileo/ragbench", dataset)
|
85 |
+
return ragbench
|
86 |
|
87 |
def load_faiss(query_dataset):
|
88 |
global index
|