Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ def detect_language(sentence):
|
|
| 14 |
output = model(**tokenized_sentence)
|
| 15 |
predictions = torch.nn.functional.softmax(output.logits, dim=-1)
|
| 16 |
_, preds = torch.max(predictions, dim=-1)
|
| 17 |
-
return
|
| 18 |
#return LANGUANGE_MAP[preds.item()]
|
| 19 |
|
| 20 |
examples = [
|
|
|
|
| 14 |
output = model(**tokenized_sentence)
|
| 15 |
predictions = torch.nn.functional.softmax(output.logits, dim=-1)
|
| 16 |
_, preds = torch.max(predictions, dim=-1)
|
| 17 |
+
return preds.item()
|
| 18 |
#return LANGUANGE_MAP[preds.item()]
|
| 19 |
|
| 20 |
examples = [
|