Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,9 @@ for question in ["What is karma?", "Who is Arjuna?"]:
|
|
113 |
# ]
|
114 |
from transformers import BertTokenizer, TFBertForQuestionAnswering
|
115 |
from transformers import AdamW # Optimizer (optional)
|
116 |
-
from transformers import SquadLoss # Loss function (optional)
|
|
|
|
|
117 |
|
118 |
# Load pre-trained model and tokenizer
|
119 |
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
|
|
|
113 |
# ]
|
114 |
from transformers import BertTokenizer, TFBertForQuestionAnswering
|
115 |
from transformers import AdamW # Optimizer (optional)
|
116 |
+
# from transformers import SquadLoss # Loss function (optional)
|
117 |
+
from transformers.models.squad import SquadLoss
|
118 |
+
|
119 |
|
120 |
# Load pre-trained model and tokenizer
|
121 |
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
|