from fastapi import APIRouter from typing import List from repository import QuestionRepository router = APIRouter( prefix="/class", tags=["Class"], ) @router.get("/negative") async def get_class_names() -> List[str]: with open(".//neural_network/classification/class_names_negative.txt", "r", encoding="utf-8") as file: class_names = [line.strip() for line in file.readlines()] return class_names @router.get("/positive") async def get_class_names() -> List[str]: with open(".//neural_network/classification/class_names_positive.txt", "r", encoding="utf-8") as file: class_names = [line.strip() for line in file.readlines()] return class_names