Spaces:
Runtime error
Runtime error
sentencebird
commited on
Commit
•
8c4f4a7
1
Parent(s):
986a697
fix: ネットワーク図のファイル名の長さ
Browse files
app.py
CHANGED
@@ -150,7 +150,7 @@ if st.button("Translate"):
|
|
150 |
tn.add_nodes(translation.decoder_text, group="dest")
|
151 |
tn.add_edges(translation.positions)
|
152 |
|
153 |
-
fname = f"{src_text}_{src_lang_name}_{tgt_lang_name}.html"
|
154 |
tn.network.show(fname)
|
155 |
html_file = open(fname, "r", encoding="utf-8")
|
156 |
components.html(html_file.read(), height=500)
|
|
|
150 |
tn.add_nodes(translation.decoder_text, group="dest")
|
151 |
tn.add_edges(translation.positions)
|
152 |
|
153 |
+
fname = f"{src_text[:20]}_{src_lang_name}_{tgt_lang_name}.html"
|
154 |
tn.network.show(fname)
|
155 |
html_file = open(fname, "r", encoding="utf-8")
|
156 |
components.html(html_file.read(), height=500)
|