davidmasip commited on
Commit
4a734ad
1 Parent(s): 4fe29cd

improve code

Browse files
Files changed (1) hide show
  1. README.md +1 -4
README.md CHANGED
@@ -28,10 +28,7 @@ results = racism_analysis_pipe("Nos vienen a robar el trabajo")
28
 
29
  def clean_labels(results):
30
  for result in results:
31
- if result["label"] == "LABEL_0":
32
- label = "Non-racist"
33
- else:
34
- label = "Racist"
35
  result["label"] = label
36
 
37
 
 
28
 
29
  def clean_labels(results):
30
  for result in results:
31
+ label = "Non-racist" if results["label"] == "LABEL_0" else "Racist"
 
 
 
32
  result["label"] = label
33
 
34