OOlajide commited on
Commit
dc15846
1 Parent(s): 534ce84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -35,10 +35,11 @@ def sentiment_model():
35
 
36
  if option == 'Extractive question answering':
37
  st.markdown("<h2 style='text-align: center; color:red;'>Extract answer from text</h2>", unsafe_allow_html=True)
38
- sample_text = "sample text"
 
39
  source = st.radio("How would you like to start? Choose an option below", ["I want to input some text", "I want to upload a file"])
40
  if source == "I want to input some text":
41
- context = st.text_area('Use the example below or input your own text in English (between 1,000 and 10,000 characters)', value=sample_text, max_chars=10000, height=330)
42
  question = st.text_input(label='Enter your question')
43
  button = st.button('Get answer')
44
  if button:
 
35
 
36
  if option == 'Extractive question answering':
37
  st.markdown("<h2 style='text-align: center; color:red;'>Extract answer from text</h2>", unsafe_allow_html=True)
38
+ with open(sample.txt, "r") as text_file:
39
+ sample_text = text_file.read()
40
  source = st.radio("How would you like to start? Choose an option below", ["I want to input some text", "I want to upload a file"])
41
  if source == "I want to input some text":
42
+ context = st.text_area('Use the example below or input your own text in English (10,000 characters max)', value=sample_text, max_chars=10000, height=330)
43
  question = st.text_input(label='Enter your question')
44
  button = st.button('Get answer')
45
  if button: