ck46 commited on
Commit
4458a4d
1 Parent(s): 8562f6b

Added text area and sidebar

Browse files
Files changed (1) hide show
  1. app.py +19 -2
app.py CHANGED
@@ -1,6 +1,23 @@
1
  import streamlit as st
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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