Spaces:
Sleeping
Sleeping
File size: 371 Bytes
fe87150 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from dataclasses import dataclass
from lib.result import Result
@dataclass(frozen=True, slots=True)
class DataEntry:
text: str
result: Result
def to_dict(self) -> dict[str, str | float | bool]:
return {
"text": self.text,
"is_phishing": self.result.is_phishing(),
"percentage": self.result.percentage
}
|