Untitled
Anonymous
plain_text
10/05/2023 4:10 AM
516 B
22
Indexable
import streamlit as st
import spacy
# Tải mô hình ngôn ngữ tiếng Việt từ vi-spacy
nlp = spacy.load("vi_spacy_model")
# Văn bản tiếng Việt đầu vào
vietnamese_text = "Xin chào"
# Dịch văn bản sang tiếng Anh
doc = nlp(vietnamese_text)
translated_text = " ".join([token.text for token in doc])
# Hiển thị kết quả dịch
st.write(translated_text)Editor is loading...