Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def generation_model():
|
|
| 35 |
if option == "Extractive question answering":
|
| 36 |
st.markdown("<h2 style='text-align: center; color:grey;'>Extractive Question Answering</h2>", unsafe_allow_html=True)
|
| 37 |
st.markdown("<h3 style='text-align: left; color:#F63366; font-size:18px;'><b>What is extractive question answering about?<b></h3>", unsafe_allow_html=True)
|
| 38 |
-
st.write("Extractive
|
| 39 |
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"])
|
| 40 |
sample_question = "What did the shepherd boy do to amuse himself?"
|
| 41 |
if source == "I want to input some text":
|
|
@@ -68,6 +68,8 @@ if option == "Extractive question answering":
|
|
| 68 |
|
| 69 |
elif option == "Text summarization":
|
| 70 |
st.markdown("<h2 style='text-align: center; color:grey;'>Text Summarization</h2>", unsafe_allow_html=True)
|
|
|
|
|
|
|
| 71 |
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"])
|
| 72 |
if source == "I want to input some text":
|
| 73 |
with open("sample.txt", "r") as text_file:
|
|
@@ -96,6 +98,8 @@ elif option == "Text summarization":
|
|
| 96 |
|
| 97 |
elif option == "Text generation":
|
| 98 |
st.markdown("<h2 style='text-align: center; color:grey;'>Text Generation</h2>", unsafe_allow_html=True)
|
|
|
|
|
|
|
| 99 |
text = st.text_input(label="Enter one line of text and let the NLP model generate the rest for you")
|
| 100 |
button = st.button("Generate text")
|
| 101 |
if button:
|
|
|
|
| 35 |
if option == "Extractive question answering":
|
| 36 |
st.markdown("<h2 style='text-align: center; color:grey;'>Extractive Question Answering</h2>", unsafe_allow_html=True)
|
| 37 |
st.markdown("<h3 style='text-align: left; color:#F63366; font-size:18px;'><b>What is extractive question answering about?<b></h3>", unsafe_allow_html=True)
|
| 38 |
+
st.write("Extractive question answering is a Natural Language Processing task where text is provided for a model so that the model can refer to it and make predictions about where the answer to a question is.")
|
| 39 |
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"])
|
| 40 |
sample_question = "What did the shepherd boy do to amuse himself?"
|
| 41 |
if source == "I want to input some text":
|
|
|
|
| 68 |
|
| 69 |
elif option == "Text summarization":
|
| 70 |
st.markdown("<h2 style='text-align: center; color:grey;'>Text Summarization</h2>", unsafe_allow_html=True)
|
| 71 |
+
st.markdown("<h3 style='text-align: left; color:#F63366; font-size:18px;'><b>What is text summarization about?<b></h3>", unsafe_allow_html=True)
|
| 72 |
+
st.write("Text summarization is producing a shorter version of a given text while preserving its important information.")
|
| 73 |
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"])
|
| 74 |
if source == "I want to input some text":
|
| 75 |
with open("sample.txt", "r") as text_file:
|
|
|
|
| 98 |
|
| 99 |
elif option == "Text generation":
|
| 100 |
st.markdown("<h2 style='text-align: center; color:grey;'>Text Generation</h2>", unsafe_allow_html=True)
|
| 101 |
+
st.markdown("<h3 style='text-align: left; color:#F63366; font-size:18px;'><b>What is this App about?<b></h3>", unsafe_allow_html=True)
|
| 102 |
+
st.write("Text generation is the task of generating text with the goal of appearing indistinguishable to human-written text.")
|
| 103 |
text = st.text_input(label="Enter one line of text and let the NLP model generate the rest for you")
|
| 104 |
button = st.button("Generate text")
|
| 105 |
if button:
|