Download model.py from shih70/dummy-hf-model: direct link, hf CLI and curl.
- Browser
- Download file 288 Bytes
-
https://huggingface.co/shih70/dummy-hf-model/resolve/main/model.py
- Command line
-
hf download hf://shih70/dummy-hf-model/model.py
-
curl -L -o model.py https://huggingface.co/shih70/dummy-hf-model/resolve/main/model.py
288 Bytes
| class DummyModel: | |
| def __init__(self): | |
| self.label = "dummy" | |
| def predict(self, text: str) -> str: | |
| return f"Prediction from dummy model on input: {text}" | |
| if __name__ == "__main__": | |
| model = DummyModel() | |
| print(model.predict("Hello, Hugging Face!")) |