DoNotChoke commited on
Commit
81bb158
·
verified ·
1 Parent(s): b6fcbc9

Add application file

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ pipe = pipeline("thainq107/en-vi-mbart50")
5
+ st.title("Dự đoán với mô hình HuggingFace")
6
+ user_input = st.text_area("Nhập đoạn văn tiếng Anh:", "")
7
+ if st.button("Dự đoán"):
8
+ if user_input:
9
+ result = pipe(user_input)
10
+ st.write("Kết quả dự đoán:", result)
11
+ else:
12
+ st.write("Vui lòng nhập đoạn văn để dự đoán.")