import streamlit as st from transformers import pipeline # Load the QA pipeline with the specified model qa_pipeline = pipeline("question-answering", model="Suhaib-27/my_awesome_qa_model") # Streamlit app st.title("Question Answering for Comprehension Passages") st.write("Enter the passage and the question, and the model will provide the answer.") # Input fields for context and question context = st.text_area("Passage", height=200) question = st.text_input("Question") # If context and question are provided, perform the inference if context and question: # Get the answer from the pipeline result = qa_pipeline(question=question, context=context) answer = result['answer'] st.write("### Answer") st.write(answer)