Spaces:
Running
Running
from dataclasses import dataclass | |
from lib.result import Result | |
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 | |
} | |