Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -7,10 +7,7 @@ from transformers import AutoTokenizer, AutoModel
|
|
7 |
import torch
|
8 |
from torch import Tensor
|
9 |
import torch.nn.functional as F
|
10 |
-
|
11 |
-
# allam_llm
|
12 |
-
# )
|
13 |
-
import os
|
14 |
os.environ['HF_HOME'] = '/'
|
15 |
|
16 |
app = FastAPI()
|
@@ -56,15 +53,4 @@ def e5_embeddings(query: str = Query(...)):
|
|
56 |
if result is not None:
|
57 |
return result.tolist()
|
58 |
else:
|
59 |
-
raise HTTPException(status_code=500)
|
60 |
-
|
61 |
-
|
62 |
-
# @app.get("/allam_response")
|
63 |
-
# def allam_response(query: str = Query(...)):
|
64 |
-
|
65 |
-
# result = allam_llm(query)
|
66 |
-
|
67 |
-
# if result is not None:
|
68 |
-
# return result
|
69 |
-
# else:
|
70 |
-
# raise HTTPException(status_code=500)
|
|
|
7 |
import torch
|
8 |
from torch import Tensor
|
9 |
import torch.nn.functional as F
|
10 |
+
|
|
|
|
|
|
|
11 |
os.environ['HF_HOME'] = '/'
|
12 |
|
13 |
app = FastAPI()
|
|
|
53 |
if result is not None:
|
54 |
return result.tolist()
|
55 |
else:
|
56 |
+
raise HTTPException(status_code=500)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|