fungi commited on
Commit
c70f210
1 Parent(s): 8f5ab34

add app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ qa_pipe = pipeline('question-answering')
5
+ context = st.text_area('provide context')
6
+ question = st.text_area('ask your question')
7
+
8
+ if text and context:
9
+ out = qa_pipe(dict(
10
+ question=question,
11
+ context=context
12
+ ))
13
+ st.json(out)