Spaces:
Sleeping
Sleeping
Commit ·
a2c3b1f
1
Parent(s): 3dc4918
added / endpoint
Browse files- app/main.py +4 -0
app/main.py
CHANGED
|
@@ -12,6 +12,10 @@ UPLOAD_DIR = "temp"
|
|
| 12 |
os.makedirs(UPLOAD_DIR, exist_ok=True)
|
| 13 |
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
@app.post("/ocr")
|
| 16 |
async def ocr_endpoint(file: UploadFile = File(...)):
|
| 17 |
try:
|
|
|
|
| 12 |
os.makedirs(UPLOAD_DIR, exist_ok=True)
|
| 13 |
|
| 14 |
|
| 15 |
+
@app.get("/")
|
| 16 |
+
def home():
|
| 17 |
+
return{"status":"ok"}
|
| 18 |
+
|
| 19 |
@app.post("/ocr")
|
| 20 |
async def ocr_endpoint(file: UploadFile = File(...)):
|
| 21 |
try:
|