Created dummy model
Browse files- README.md +11 -0
- config.json +4 -0
- model.py +11 -0
README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dummy Hugging Face Model
|
| 2 |
+
|
| 3 |
+
This is a **dummy model** published to the Hugging Face Hub for testing purposes.
|
| 4 |
+
|
| 5 |
+
## Usage
|
| 6 |
+
|
| 7 |
+
```python
|
| 8 |
+
from model import DummyModel
|
| 9 |
+
|
| 10 |
+
model = DummyModel()
|
| 11 |
+
print(model.predict("Hello, Hugging Face!"))
|
config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "dummy",
|
| 3 |
+
"description": "A dummy model that does nothing."
|
| 4 |
+
}
|
model.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class DummyModel:
|
| 2 |
+
def __init__(self):
|
| 3 |
+
self.label = "dummy"
|
| 4 |
+
|
| 5 |
+
def predict(self, text: str) -> str:
|
| 6 |
+
return f"Prediction from dummy model on input: {text}"
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
if __name__ == "__main__":
|
| 10 |
+
model = DummyModel()
|
| 11 |
+
print(model.predict("Hello, Hugging Face!"))
|