Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,8 @@ import pandas as pd
|
|
5 |
import torch
|
6 |
from pathlib import Path
|
7 |
|
|
|
|
|
8 |
# Define the function to categorize ages
|
9 |
def categorize_source(source):
|
10 |
if "Nasa'i" in source:
|
@@ -34,8 +36,6 @@ def find(query):
|
|
34 |
print("cekpoin0\n")
|
35 |
|
36 |
hadiths = pd.read_csv('all_hadiths_clean.csv', delimiter=",")
|
37 |
-
|
38 |
-
model = SentenceTransformer('intfloat/multilingual-e5-large-instruct')
|
39 |
|
40 |
document_embeddings = torch.load('encoded_hadiths_multilingual-e5-large-instruct (1).sav',map_location ='cpu')
|
41 |
#file = open('encoded_hadiths_multilingual-e5-large-instruct (1).sav','rb')
|
|
|
5 |
import torch
|
6 |
from pathlib import Path
|
7 |
|
8 |
+
model = SentenceTransformer('intfloat/multilingual-e5-large-instruct')
|
9 |
+
|
10 |
# Define the function to categorize ages
|
11 |
def categorize_source(source):
|
12 |
if "Nasa'i" in source:
|
|
|
36 |
print("cekpoin0\n")
|
37 |
|
38 |
hadiths = pd.read_csv('all_hadiths_clean.csv', delimiter=",")
|
|
|
|
|
39 |
|
40 |
document_embeddings = torch.load('encoded_hadiths_multilingual-e5-large-instruct (1).sav',map_location ='cpu')
|
41 |
#file = open('encoded_hadiths_multilingual-e5-large-instruct (1).sav','rb')
|