Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ def cosine_similarity(vec1: List[int], vec2: List[int]):
|
|
14 |
return 1 - spatial.distance.cosine(vec1, vec2)
|
15 |
|
16 |
|
17 |
-
uae = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1')
|
18 |
-
uae_code = AnglE.from_pretrained('WhereIsAI/UAE-Code-Large-V1')
|
19 |
|
20 |
|
21 |
def code_similarity(code1, code2, model):
|
|
|
14 |
return 1 - spatial.distance.cosine(vec1, vec2)
|
15 |
|
16 |
|
17 |
+
uae = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1').to('cpu')
|
18 |
+
uae_code = AnglE.from_pretrained('WhereIsAI/UAE-Code-Large-V1').to('cpu')
|
19 |
|
20 |
|
21 |
def code_similarity(code1, code2, model):
|