Spaces:
Sleeping
Sleeping
Eslam Magdy
commited on
Update main.py
Browse files
main.py
CHANGED
|
@@ -53,5 +53,18 @@ def e5_embeddings(query: str = Query(...)):
|
|
| 53 |
|
| 54 |
if result is not None:
|
| 55 |
return result.tolist()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
else:
|
| 57 |
raise HTTPException(status_code=500)
|
|
|
|
| 53 |
|
| 54 |
if result is not None:
|
| 55 |
return result.tolist()
|
| 56 |
+
else:
|
| 57 |
+
raise HTTPException(status_code=500)
|
| 58 |
+
|
| 59 |
+
from Allam_Backend import (
|
| 60 |
+
allam_llm
|
| 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)
|