Update app.py
Browse files
app.py
CHANGED
|
@@ -9,23 +9,7 @@ model = AutoModelForQuestionAnswering.from_pretrained(model_name)
|
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 10 |
|
| 11 |
def main():
|
| 12 |
-
|
| 13 |
-
selected_section = st.radio("Go to", ("Context", "Questions"))
|
| 14 |
-
|
| 15 |
-
if selected_section == "Context":
|
| 16 |
-
render_context_section()
|
| 17 |
-
elif selected_section == "Questions":
|
| 18 |
-
render_questions_section()
|
| 19 |
-
|
| 20 |
-
def render_context_section():
|
| 21 |
-
context = ''
|
| 22 |
-
st.title("Context Section")
|
| 23 |
-
temp_context = st.text_input('Enter your context: ')
|
| 24 |
-
context = temp_context
|
| 25 |
-
# TODO: Add content and functionality for the context section
|
| 26 |
-
|
| 27 |
-
def render_questions_section():
|
| 28 |
-
st.title("Questions Section")
|
| 29 |
question = st.text_input('Enter your question: ')
|
| 30 |
context = st.text_input('Enter your context: ')
|
| 31 |
if st.button('Get Answer'):
|
|
|
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 10 |
|
| 11 |
def main():
|
| 12 |
+
st.title("Context Based Question Answering Chatbot")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
question = st.text_input('Enter your question: ')
|
| 14 |
context = st.text_input('Enter your context: ')
|
| 15 |
if st.button('Get Answer'):
|