dinalzein commited on
Commit
015eea5
Β·
1 Parent(s): dfb0587
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -38,7 +38,7 @@ def identify_language2(txt):
38
  output = model(**tokenized_txt)
39
  predictions = torch.nn.functional.softmax(output.logits, dim=-1)
40
  _, preds = torch.max(predictions, dim=-1)
41
- return languages_map[id2labe[str(preds.item())]]
42
 
43
  #with gr.Row():
44
  examples = [
 
38
  output = model(**tokenized_txt)
39
  predictions = torch.nn.functional.softmax(output.logits, dim=-1)
40
  _, preds = torch.max(predictions, dim=-1)
41
+ return languages_map[id2label[str(preds.item())]]
42
 
43
  #with gr.Row():
44
  examples = [