WesScivetti commited on
Commit
0bbfce0
·
verified ·
1 Parent(s): 0401c86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -244,10 +244,12 @@ def classify_tokens(text: str, use_canned=False):
244
  )
245
 
246
  # tagged spans
247
- results_spans = pipe(text, aggregation_strategy="simple").sort(key=lambda x: x["start"])
 
248
 
249
  # per-token + probabilities
250
- results_tokens = pipe(text, aggregation_strategy="none", ignore_labels=[]).sort(key=lambda x: x["start"])
 
251
  print(results_tokens)
252
  else: # canned example to test the output display
253
  text = "fox in socks"
 
244
  )
245
 
246
  # tagged spans
247
+ results_spans = pipe(text, aggregation_strategy="simple")
248
+ results_spans.sort(key=lambda x: x["start"])
249
 
250
  # per-token + probabilities
251
+ results_tokens = pipe(text, aggregation_strategy="none", ignore_labels=[])
252
+ results_tokens.sort(key=lambda x: x["start"])
253
  print(results_tokens)
254
  else: # canned example to test the output display
255
  text = "fox in socks"