Spaces:
Running
on
Zero
Running
on
Zero
faf
Browse files- babyagi/classesa/diamond.py +1 -18
- mysite/routers/fastapi.py +1 -1
babyagi/classesa/diamond.py
CHANGED
@@ -2,24 +2,7 @@ import psycopg2
|
|
2 |
from sentence_transformers import SentenceTransformer
|
3 |
from fastapi import APIRouter, HTTPException
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
@router.get("/route/{calat}/{wehth}/{state}/{x}")
|
8 |
-
async def route(calat: float, wehth: float, state: str, x: int):
|
9 |
-
# Validate input parameters
|
10 |
-
if not (0.0 <= calat <= 90.0):
|
11 |
-
raise HTTPException(status_code=400, detail="Invalid calat value.")
|
12 |
-
if not (0.0 <= wehth <= 180.0):
|
13 |
-
raise HTTPException(status_code=400, detail="Invalid wehth value.")
|
14 |
-
if state not in ["AC", "AL", "AP", ..., "TO"]:
|
15 |
-
raise HTTPException(status_code=400, detail="Invalid state value.")
|
16 |
-
if not (0 <= x <= 100):
|
17 |
-
raise HTTPException(status_code=400, detail="Invalid x value.")
|
18 |
-
|
19 |
-
# Process the request and return a response
|
20 |
-
# ...
|
21 |
-
|
22 |
-
return {"result": "OK"}
|
23 |
|
24 |
|
25 |
class ProductDatabase:
|
|
|
2 |
from sentence_transformers import SentenceTransformer
|
3 |
from fastapi import APIRouter, HTTPException
|
4 |
|
5 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
|
8 |
class ProductDatabase:
|
mysite/routers/fastapi.py
CHANGED
@@ -186,7 +186,7 @@ def setup_webhook_routes(app: FastAPI):
|
|
186 |
promps,prompt_res = prompt_genalate("返信は日本語で答えて下さい "+text,prompt2)
|
187 |
#test_set_lide(text,"a1")
|
188 |
#no_process_file(text, "ai")
|
189 |
-
from babyagi.classesa import calculate
|
190 |
title = f""" ダイヤ計算の実行 cut calat clarity weght """
|
191 |
calculate("")
|
192 |
subtitle = prompt_res
|
|
|
186 |
promps,prompt_res = prompt_genalate("返信は日本語で答えて下さい "+text,prompt2)
|
187 |
#test_set_lide(text,"a1")
|
188 |
#no_process_file(text, "ai")
|
189 |
+
from babyagi.classesa.diamond import calculate
|
190 |
title = f""" ダイヤ計算の実行 cut calat clarity weght """
|
191 |
calculate("")
|
192 |
subtitle = prompt_res
|