Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -175,6 +175,9 @@ STYLE = """
|
|
| 175 |
.nonselected-sequence {
|
| 176 |
background-color: var(--primary-500);
|
| 177 |
}
|
|
|
|
|
|
|
|
|
|
| 178 |
"""
|
| 179 |
|
| 180 |
|
|
@@ -238,14 +241,14 @@ def generate_nodes(node, step):
|
|
| 238 |
|
| 239 |
def generate_html(start_sentence, original_tree):
|
| 240 |
html_output = f"""<div class="custom-container">
|
| 241 |
-
<div class="tree"> <li>
|
| 242 |
<div class="box" id='root'> <span> <b>{start_sentence}</b> </span> {original_tree.table} </div>"""
|
| 243 |
html_output += "<ul> "
|
| 244 |
for subnode in original_tree.children.values():
|
| 245 |
html_output += generate_nodes(subnode, step=1)
|
| 246 |
html_output += "</ul>"
|
| 247 |
html_output += """
|
| 248 |
-
</li></div>
|
| 249 |
</div>
|
| 250 |
"""
|
| 251 |
return html_output
|
|
|
|
| 175 |
.nonselected-sequence {
|
| 176 |
background-color: var(--primary-500);
|
| 177 |
}
|
| 178 |
+
.nomargin {
|
| 179 |
+
margin-left: 0!important;
|
| 180 |
+
}
|
| 181 |
"""
|
| 182 |
|
| 183 |
|
|
|
|
| 241 |
|
| 242 |
def generate_html(start_sentence, original_tree):
|
| 243 |
html_output = f"""<div class="custom-container">
|
| 244 |
+
<div class="tree"> <ul class="nomargin"><li class="nomargin">
|
| 245 |
<div class="box" id='root'> <span> <b>{start_sentence}</b> </span> {original_tree.table} </div>"""
|
| 246 |
html_output += "<ul> "
|
| 247 |
for subnode in original_tree.children.values():
|
| 248 |
html_output += generate_nodes(subnode, step=1)
|
| 249 |
html_output += "</ul>"
|
| 250 |
html_output += """
|
| 251 |
+
</li></ul></div>
|
| 252 |
</div>
|
| 253 |
"""
|
| 254 |
return html_output
|