File size: 581 Bytes
fef6825
434466a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from pydantic import BaseModel

class FraudPredictionInput(BaseModel):
    """
    FraudPredictionInput is a class that represents the input data for fraud prediction.
    """
    transaction_category: str
    transaction_amount: float
    customer_job: str
    customer_address_state: str
    customer_address_city: str
    customer_address_city_population: int

class FraudPredictionOutput(BaseModel):
    """
    FraudPredictionOutput is a class that represents the output data for fraud prediction.
    """
    result: int
    fraud_probability: float
    model_metadata: dict