Spaces:
Runtime error
Runtime error
Henry Qu
commited on
Commit
·
f42f51d
1
Parent(s):
93f9dc3
app.py
CHANGED
@@ -15,14 +15,14 @@ with open(json_file, 'r') as file:
|
|
15 |
data = json.load(file)
|
16 |
for key, value in data.items():
|
17 |
text_description = value['text_description']
|
18 |
-
inputs = tokenizer(text_description, return_tensors="pt"
|
19 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
20 |
logits = outputs.logits
|
21 |
logits_dict[key] = logits
|
22 |
|
23 |
|
24 |
def search_index(query):
|
25 |
-
inputs = tokenizer(query, return_tensors="pt"
|
26 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
27 |
|
28 |
max_similarity = float('-inf')
|
|
|
15 |
data = json.load(file)
|
16 |
for key, value in data.items():
|
17 |
text_description = value['text_description']
|
18 |
+
inputs = tokenizer(text_description, return_tensors="pt")
|
19 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
20 |
logits = outputs.logits
|
21 |
logits_dict[key] = logits
|
22 |
|
23 |
|
24 |
def search_index(query):
|
25 |
+
inputs = tokenizer(query, return_tensors="pt")
|
26 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
27 |
|
28 |
max_similarity = float('-inf')
|