pranjalchitale
commited on
Commit
•
d387b13
1
Parent(s):
7451e53
Inherit from GenerationMixin
Browse files- modeling_indictrans.py +2 -1
modeling_indictrans.py
CHANGED
@@ -46,6 +46,7 @@ from transformers.utils import (
|
|
46 |
)
|
47 |
|
48 |
from transformers.modeling_utils import PreTrainedModel
|
|
|
49 |
|
50 |
from .configuration_indictrans import IndicTransConfig
|
51 |
|
@@ -1641,7 +1642,7 @@ class IndicTransModel(IndicTransPreTrainedModel):
|
|
1641 |
|
1642 |
|
1643 |
# Copied from transformers.models.m2m_100.modeling_m2m_100.M2M100ForConditionalGeneration->IndicTrans
|
1644 |
-
class IndicTransForConditionalGeneration(IndicTransPreTrainedModel):
|
1645 |
base_model_prefix = "model"
|
1646 |
_tied_weights_keys = None
|
1647 |
_label_smoothing = 0.0
|
|
|
46 |
)
|
47 |
|
48 |
from transformers.modeling_utils import PreTrainedModel
|
49 |
+
from transformers.generation.utils import GenerationMixin
|
50 |
|
51 |
from .configuration_indictrans import IndicTransConfig
|
52 |
|
|
|
1642 |
|
1643 |
|
1644 |
# Copied from transformers.models.m2m_100.modeling_m2m_100.M2M100ForConditionalGeneration->IndicTrans
|
1645 |
+
class IndicTransForConditionalGeneration(IndicTransPreTrainedModel, GenerationMixin):
|
1646 |
base_model_prefix = "model"
|
1647 |
_tied_weights_keys = None
|
1648 |
_label_smoothing = 0.0
|