Spaces:
Paused
Paused
| from fastapi import FastAPI, UploadFile, File, HTTPException | |
| from fastapi.middleware.cors import CORSMiddleware | |
| import easyocr | |
| import re | |
| import shutil | |
| import os | |
| import uuid | |
| app = FastAPI() | |
| app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_methods=["*"], allow_headers=["*"]) | |
| reader = easyocr.Reader(['en'], gpu=False) | |
| def home(): | |
| return {"status": "online", 'message':"UPI OCR API is running"} |