Added text area and sidebar
Browse files
app.py
CHANGED
@@ -1,6 +1,23 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
4 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# Add a model selector to the sidebar
|
4 |
+
model = st.sidebar.selectbox(
|
5 |
+
'Select Model',
|
6 |
+
('t5-base-squad-qa-qg', 't5-small-squad-qa-qg', 't5-base-hotpot-qa-qg', 't5-small-hotpot-qa-qg')
|
7 |
+
)
|
8 |
+
|
9 |
+
st.header('Question-Answer Generation')
|
10 |
+
st.write(f'Model in use: {model}')
|
11 |
+
|
12 |
+
txt = st.text_area('Text for context')
|
13 |
+
|
14 |
+
|
15 |
+
if len(txt) >= 1:
|
16 |
+
autocards = []
|
17 |
+
else:
|
18 |
+
autocards = []
|
19 |
+
|
20 |
+
st.header('Generated question and answers')
|
21 |
+
st.write(autocards)
|
22 |
|
23 |
|