CoolFace
Apppublic

CoderLakshman/Final_Assignment_Template

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
models.py45 linesDownload Raw Back to root
1# from enum import StrEnum2from pydantic import BaseModel, ConfigDict3 4 5class GoogleModelID():6  GEMINI_2_0_FLASH = "gemini-2.0-flash"7  GEMINI_2_5_FLASH_PREVIEW = "gemini-2.5-flash-preview"8 9class OpenRouterModelID():10    MISTRAL_FREE = "openrouter/mistralai/mistral-7b-instruct:free"11    QWEN_3_14B_FREE = "openrouter/qwen/qwen3-14b:free"12    GPT_4_1_MINI = "openrouter/openai/gpt-4.1-mini"13    GPT_O4_MINI = "openrouter/openai/o4-mini"14    GPT_O4_MINI_HIGH = "openrouter/openai/o4-mini-high"15    GROK_3_MINI_BETA = "openrouter/x-ai/grok-3-mini-beta"16    GROK_3_BETA = "openrouter/x-ai/grok-3-beta"17  18  19class Question(BaseModel):20    model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)21    task_id: str22    question: str23    file_name: str24 25class Answer(BaseModel):26    task_id: str27    answer: str28 29class QuestionAnswerPair(BaseModel):30    task_id: str31    question: str32    answer: str33    34    def get_answer(self) -> dict[str, str]:35        return {"task_id": self.task_id, "submitted_answer": self.answer}36 37class Results(BaseModel):38    model_config = ConfigDict(from_attributes=True)39    username: str40    score: int41    correct_count: int42    total_attempted: int43    message: str44    timestamp: str45