Jasper Lu
commited on
Commit
•
4efd111
1
Parent(s):
e3e2384
update req
Browse files- handler.py +2 -0
- requirements.txt +2 -21
handler.py
CHANGED
@@ -27,6 +27,8 @@ class EndpointHandler():
|
|
27 |
embedding = torch.mean(last_hidden_state, dim=1).flatten().tolist()
|
28 |
return {"embedding": embedding}
|
29 |
|
|
|
30 |
handler = EndpointHandler()
|
31 |
output = handler({"inputs": "https://figma-staging-api.s3.us-west-2.amazonaws.com/images/a8c6a0cc-c022-4f3a-9fc5-ac8582c964dd"})
|
32 |
print(output)
|
|
|
|
27 |
embedding = torch.mean(last_hidden_state, dim=1).flatten().tolist()
|
28 |
return {"embedding": embedding}
|
29 |
|
30 |
+
"""
|
31 |
handler = EndpointHandler()
|
32 |
output = handler({"inputs": "https://figma-staging-api.s3.us-west-2.amazonaws.com/images/a8c6a0cc-c022-4f3a-9fc5-ac8582c964dd"})
|
33 |
print(output)
|
34 |
+
"""
|
requirements.txt
CHANGED
@@ -1,22 +1,3 @@
|
|
1 |
-
certifi==2023.7.22
|
2 |
-
charset-normalizer==3.3.2
|
3 |
-
filelock==3.13.1
|
4 |
-
fsspec==2023.10.0
|
5 |
-
huggingface-hub==0.17.3
|
6 |
-
idna==3.4
|
7 |
-
Jinja2==3.1.2
|
8 |
-
MarkupSafe==2.1.3
|
9 |
-
mpmath==1.3.0
|
10 |
-
networkx==3.2.1
|
11 |
-
numpy==1.26.2
|
12 |
-
packaging==23.2
|
13 |
Pillow==10.1.0
|
14 |
-
|
15 |
-
|
16 |
-
requests==2.31.0
|
17 |
-
safetensors==0.4.0
|
18 |
-
sympy==1.12
|
19 |
-
tokenizers==0.14.1
|
20 |
-
tqdm==4.66.1
|
21 |
-
typing_extensions==4.8.0
|
22 |
-
urllib3==2.1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
Pillow==10.1.0
|
2 |
+
torch==2.1.0
|
3 |
+
transformers==4.35.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|