Spaces:
Sleeping
Sleeping
Bor Hodošček
commited on
fix: do not decode xhtml in the app; doc spacing
Browse files
app.py
CHANGED
@@ -60,8 +60,9 @@ def _(mo):
|
|
60 |
|
61 |
{
|
62 |
mo.callout('''
|
63 |
-
|
64 |
-
|
|
|
65 |
''')
|
66 |
}
|
67 |
"""
|
@@ -311,7 +312,7 @@ def show_natsume_head(aozora_xhtml_file, mo, xhtml_encoding):
|
|
311 |
xhtml_enc = xhtml_encoding.value
|
312 |
if aozora_xhtml_file.value:
|
313 |
uploaded_xhtml = aozora_xhtml_file.contents()
|
314 |
-
xhtml_raw = uploaded_xhtml
|
315 |
else:
|
316 |
with open("789_14547.html", "rb") as xhtml_f:
|
317 |
xhtml_raw = xhtml_f.read()
|
@@ -442,10 +443,10 @@ def toggle_diff(mo):
|
|
442 |
|
443 |
@app.cell
|
444 |
def compare_preprocessed_vs_old(
|
445 |
-
mo,
|
446 |
aozora_xhtml_processed_text,
|
447 |
cleaned_text,
|
448 |
diff_changes,
|
|
|
449 |
run_diff,
|
450 |
):
|
451 |
"""
|
|
|
60 |
|
61 |
{
|
62 |
mo.callout('''
|
63 |
+
By default, this demo uses Natsume Soseki's _‘Wagahai wa neko de aru’_
|
64 |
+
|
65 |
+
ファイルをアップロードしない場合は、デフォルトで夏目漱石『吾輩は猫である』が使用されます。
|
66 |
''')
|
67 |
}
|
68 |
"""
|
|
|
312 |
xhtml_enc = xhtml_encoding.value
|
313 |
if aozora_xhtml_file.value:
|
314 |
uploaded_xhtml = aozora_xhtml_file.contents()
|
315 |
+
xhtml_raw = uploaded_xhtml
|
316 |
else:
|
317 |
with open("789_14547.html", "rb") as xhtml_f:
|
318 |
xhtml_raw = xhtml_f.read()
|
|
|
443 |
|
444 |
@app.cell
|
445 |
def compare_preprocessed_vs_old(
|
|
|
446 |
aozora_xhtml_processed_text,
|
447 |
cleaned_text,
|
448 |
diff_changes,
|
449 |
+
mo,
|
450 |
run_diff,
|
451 |
):
|
452 |
"""
|