Instructions to use noma2103/model_uppercase with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Flair
How to use noma2103/model_uppercase with Flair:
from flair.models import SequenceTagger tagger = SequenceTagger.load("noma2103/model_uppercase") - Notebooks
- Google Colab
- Kaggle
| 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() | |