DoNotChoke's picture
Add application file
81bb158 verified
raw
history blame
432 Bytes
import streamlit as st
from transformers import pipeline
pipe = pipeline("thainq107/en-vi-mbart50")
st.title("Dự đoán với mô hình HuggingFace")
user_input = st.text_area("Nhập đoạn văn tiếng Anh:", "")
if st.button("Dự đoán"):
if user_input:
result = pipe(user_input)
st.write("Kết quả dự đoán:", result)
else:
st.write("Vui lòng nhập đoạn văn để dự đoán.")