kxx-kkk commited on
Commit
9ccf1c4
1 Parent(s): 0042198

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -76,14 +76,14 @@ with tab2:
76
  # transfer file to context and allow ask question, then perform question answering
77
  if uploaded_file is not None:
78
  raw_text = str(uploaded_file.read(),"utf-8")
79
- context = st.text_area("", value=raw_text, height=330)
80
  question = st.text_input(label="Enter your question", value="Enter question here")
81
 
82
  # perform question answering when "get answer" button clicked
83
- button2 = st.error("Get answer", key="fileInput")
84
  if button2:
85
  if context=="" or question=="":
86
- st.warning ("Please enter BOTH the context and the question", icon="🚨")
87
  else:
88
  question_answering(context, question)
89
 
 
76
  # transfer file to context and allow ask question, then perform question answering
77
  if uploaded_file is not None:
78
  raw_text = str(uploaded_file.read(),"utf-8")
79
+ context = st.text_area("Your essay context: ", value=raw_text, height=330)
80
  question = st.text_input(label="Enter your question", value="Enter question here")
81
 
82
  # perform question answering when "get answer" button clicked
83
+ button2 = st.button("Get answer", key="fileInput")
84
  if button2:
85
  if context=="" or question=="":
86
+ st.error ("Please enter BOTH the context and the question", icon="🚨")
87
  else:
88
  question_answering(context, question)
89