OOlajide commited on
Commit
544e883
·
1 Parent(s): c159493

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,12 +34,12 @@ def sentiment_model():
34
  return sentiment_analysis
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
  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"])
39
  if source == "I want to input some text":
40
- sample_text = ""
41
- with open(sample.txt, "r") as text_file:
42
- sample_text = text_file.read()
43
  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)
44
  question = st.text_input(label='Enter your question')
45
  button = st.button('Get answer')
 
34
  return sentiment_analysis
35
 
36
  if option == 'Extractive question answering':
37
+ sample_text = ""
38
+ with open(sample.txt, "r") as text_file:
39
+ sample_text = text_file.read()
40
  st.markdown("<h2 style='text-align: center; color:red;'>Extract answer from text</h2>", unsafe_allow_html=True)
41
  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"])
42
  if source == "I want to input some text":
 
 
 
43
  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)
44
  question = st.text_input(label='Enter your question')
45
  button = st.button('Get answer')