Instructions to use creative-graphic-design/BASNet-SmartText with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use creative-graphic-design/BASNet-SmartText with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="creative-graphic-design/BASNet-SmartText", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("creative-graphic-design/BASNet-SmartText", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload model
Browse files- modeling_basnet.py +2 -0
modeling_basnet.py
CHANGED
|
@@ -148,6 +148,8 @@ class BasicBlock(nn.Module):
|
|
| 148 |
|
| 149 |
|
| 150 |
class BASNetModel(PreTrainedModel):
|
|
|
|
|
|
|
| 151 |
def __init__(self, config: BASNetConfig) -> None:
|
| 152 |
super().__init__(config)
|
| 153 |
|
|
|
|
| 148 |
|
| 149 |
|
| 150 |
class BASNetModel(PreTrainedModel):
|
| 151 |
+
config_class = BASNetConfig
|
| 152 |
+
|
| 153 |
def __init__(self, config: BASNetConfig) -> None:
|
| 154 |
super().__init__(config)
|
| 155 |
|