I have orientation corrector class in seperate python file which takes rotated image and logo based on logo location it rotates image to correct orientation.
Now I am calling this class in fastapi but I am getting de
from orientation_corrector import OrientationCorrector
from fastapi import FastAPI
from fastapi import FastAPI, File, UploadFile
import uvicorn
app = FastAPI()
app.post('/image')
async def orientation_corrector_image(file1: UploadFile = File("assets\rotated_marks.png"),
file2: UploadFile = File("src\configs\Logo.json")):
image = (await file1.read())
logo = (await file2.read())
print(image)
print(logo)
result=OrientationCorrector(image,logo)
return result
if __name__ == "__main__":
uvicorn.run(app, debug=True)```