Untitled
unknown
plain_text
2 years ago
385 B
9
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...