Diezu commited on
Commit
749397b
·
verified ·
1 Parent(s): b1d9fba

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ st.title('Question Answering')
5
+ model_checkpoint = 'Diezu/dieumrc'
6
+ question_answerer = pipeline("question-answering", model=model_checkpoint)
7
+
8
+ context = st.text_area('CONTEXT')
9
+ question = st.text_input('QUESTION')
10
+
11
+ if st.button('ANSWER'):
12
+ i=question_answerer(question,context)
13
+ #st.write(i['answer'])
14
+ st.markdown(i['answer'])
15
+ #st.write('<h1 style="font-size: 50px;">i['answer']</h1>')