Commit 54d20fbc authored by rdosa05's avatar rdosa05

[Gen AI] middle ware to allow UI calls.

parent a02775fd
......@@ -7,6 +7,14 @@ from reviewsense.services.ReviewService import ReviewService
router = APIRouter()
review_service = ReviewService()
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:3000"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@router.post("/calculate_ratings/", response_model=Dict[str, Optional[float]])
async def calculate_ratings(input_data: ProductReviewInput):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment