pranshu dhiman
Initial commit with Docker and Streamlit
46b701f
Raw
History Blame Contribute Delete
798 Bytes
from __future__ import annotations
from dataclasses import dataclass
@dataclass(frozen=True)
class Flashcard:
question: str
short_answer: str
long_answer: str
concept: str = ""
difficulty: str = "medium"
bloom_level: str = "understand"
@property
def answer(self) -> str:
"""Backward-compatible combined answer used by older tests/exports."""
return f"Short answer: {self.short_answer}\n\nLong answer: {self.long_answer}"
@dataclass(frozen=True)
class GenerationSettings:
chunk_min_tokens: int = 300
chunk_max_tokens: int = 500
concepts_per_chunk: int = 5
cards_per_concept: int = 1
generate_all_possible: bool = False
harden_questions: bool = True
model_name: str = "google/flan-t5-small"
use_model: bool = True