File size: 641 Bytes
beaac51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class ToUpperCaseModel:
    def __init__(self):
        pass  # No initialization needed for this simple model

    def __call__(self, inputs):
        """
        Convert a single lowercase letter to uppercase.
        :param inputs: Dictionary with key "letter".
        :return: Dictionary with key "uppercase_letter".
        """
        letter = inputs.get("letter", "")
        if len(letter) == 1 and letter.islower():
            return {"uppercase_letter": letter.upper()}
        else:
            return {"error": "Invalid input. Provide a single lowercase letter."}

# Instantiate and expose the model
model = ToUpperCaseModel()