Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,6 +15,7 @@ def detect_language(sentence):
|
|
| 15 |
predictions = torch.nn.functional.softmax(output.logits, dim=-1)
|
| 16 |
_, preds = torch.max(predictions, dim=-1)
|
| 17 |
return LANGUANGE_MAP[preds.item()]
|
|
|
|
| 18 |
|
| 19 |
examples = [
|
| 20 |
"My Language detector using HuggingFace space.",
|
|
|
|
| 15 |
predictions = torch.nn.functional.softmax(output.logits, dim=-1)
|
| 16 |
_, preds = torch.max(predictions, dim=-1)
|
| 17 |
return LANGUANGE_MAP[preds.item()]
|
| 18 |
+
#return LANGUANGE_MAP[preds.item()]
|
| 19 |
|
| 20 |
examples = [
|
| 21 |
"My Language detector using HuggingFace space.",
|