File size: 398 Bytes
9c36111
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from typing import List
from fastapi import FastAPI

from models import RequestModel, ResponseModel
from similarity import check_similarity

app = FastAPI()


@app.post("/similarity", summary="Perform images similarity", response_model=List[ResponseModel], tags=["Similarities"])
async def similarity(images: List[RequestModel]):
    similarities = check_similarity(images)
    return similarities