Spaces:
Runtime error
Runtime error
imperialwool
commited on
Commit
•
46dbb69
1
Parent(s):
5b4614a
Update main.py
Browse files
main.py
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
from fastapi import Depends, FastAPI, Body
|
3 |
from fastapi.responses import JSONResponse, HTMLResponse
|
4 |
from uvicorn import run
|
5 |
-
from utils import predict
|
|
|
6 |
|
7 |
# initing things
|
8 |
app = FastAPI()
|
@@ -21,6 +22,7 @@ async def resolveGet():
|
|
21 |
|
22 |
@app.post("/amino-captcha-ocr/api/v1/predict")
|
23 |
async def resolvePost(data = Body()):
|
|
|
24 |
return await predict(data["url"])
|
25 |
|
26 |
run(app, host="0.0.0.0", port=7860)
|
|
|
2 |
from fastapi import Depends, FastAPI, Body
|
3 |
from fastapi.responses import JSONResponse, HTMLResponse
|
4 |
from uvicorn import run
|
5 |
+
from utils import predict
|
6 |
+
import datetime
|
7 |
|
8 |
# initing things
|
9 |
app = FastAPI()
|
|
|
22 |
|
23 |
@app.post("/amino-captcha-ocr/api/v1/predict")
|
24 |
async def resolvePost(data = Body()):
|
25 |
+
print(datetime.datetime.now())
|
26 |
return await predict(data["url"])
|
27 |
|
28 |
run(app, host="0.0.0.0", port=7860)
|