Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def CompressXML(xml_text):
|
|
65 |
if isinstance(elem.tag, str) and 'Comment' in elem.tag:
|
66 |
elem.parent.remove(elem)
|
67 |
#return ET.tostring(root, encoding='unicode', method="xml")
|
68 |
-
return ET.tostring(root, encoding='unicode', method="xml")[:
|
69 |
|
70 |
|
71 |
def read_file_content(file):
|
|
|
65 |
if isinstance(elem.tag, str) and 'Comment' in elem.tag:
|
66 |
elem.parent.remove(elem)
|
67 |
#return ET.tostring(root, encoding='unicode', method="xml")
|
68 |
+
return ET.tostring(root, encoding='unicode', method="xml")[:4000] # hack - top N characters to keep context document under token max
|
69 |
|
70 |
|
71 |
def read_file_content(file):
|