Spaces:
Runtime error
Runtime error
File size: 550 Bytes
f52ac06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import streamlit as st
import yake
st.title("Question answer generation")
st.markdown("The model outputs a set of questions and answers based on a paragraph")
# Text input widget
text = st.text_area(label="Enter text corpus here")
# For now we consider only single paragraphs of text
# paragraphs = parse_text(text) would break the text into multiple paragraphs
# Initialize the keyword extractor
kw_extractor = yake.KeywordExtractor()
keywords = kw_extractor.extract_keywords(text)
# Display the keywords that were extracted
st.write(keywords)
|