Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -58,6 +58,7 @@ def generate_html(ids):
|
|
58 |
html_content += '</body></html>'
|
59 |
return html_content
|
60 |
|
|
|
61 |
sentence = st.text_input("Entrez une phrase en français:")
|
62 |
if sentence:
|
63 |
inputs = tokenizer(sentence, return_tensors="pt").input_ids
|
@@ -68,4 +69,4 @@ if sentence:
|
|
68 |
pictogram_ids = [get_id_picto_from_predicted_lemma(lexicon, lemma) for lemma in sentence_to_map]
|
69 |
|
70 |
html = generate_html(pictogram_ids)
|
71 |
-
st.components.v1.html(html, scrolling=True)
|
|
|
58 |
html_content += '</body></html>'
|
59 |
return html_content
|
60 |
|
61 |
+
st.title("Traduction d'une phrase en pictogrammes ARASAAC")
|
62 |
sentence = st.text_input("Entrez une phrase en français:")
|
63 |
if sentence:
|
64 |
inputs = tokenizer(sentence, return_tensors="pt").input_ids
|
|
|
69 |
pictogram_ids = [get_id_picto_from_predicted_lemma(lexicon, lemma) for lemma in sentence_to_map]
|
70 |
|
71 |
html = generate_html(pictogram_ids)
|
72 |
+
st.components.v1.html(html, height=800, scrolling=True)
|