a-menu commited on
Commit
2c16fe6
1 Parent(s): 1cc581b

change body_element

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -371,7 +371,7 @@ def get_body_text(xml_input):
371
  body = root.xpath("//tei:body", namespaces={"tei": "http://www.tei-c.org/ns/1.0"})
372
 
373
  if body:
374
- body_element = body[0] if len(body) == 1 else None
375
 
376
  if len(body_element) > 0:
377
  # Extract the text content
@@ -452,7 +452,7 @@ def entities_to_xml(xml_content, ner):
452
  body = root.xpath("//tei:body", namespaces={"tei": "http://www.tei-c.org/ns/1.0"})
453
 
454
  if body:
455
- body_element = body[0] if len(body) == 1 else None
456
 
457
  if len(body_element) > 0:
458
 
 
371
  body = root.xpath("//tei:body", namespaces={"tei": "http://www.tei-c.org/ns/1.0"})
372
 
373
  if body:
374
+ body_element = body[0]
375
 
376
  if len(body_element) > 0:
377
  # Extract the text content
 
452
  body = root.xpath("//tei:body", namespaces={"tei": "http://www.tei-c.org/ns/1.0"})
453
 
454
  if body:
455
+ body_element = body[0]
456
 
457
  if len(body_element) > 0:
458