File size: 432 Bytes
81bb158
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
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.")