Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,14 +86,15 @@ st.markdown("""
|
|
| 86 |
display: flex;
|
| 87 |
align-items: center;
|
| 88 |
margin-bottom: 20px;
|
|
|
|
| 89 |
}
|
| 90 |
.header img {
|
| 91 |
-
height: 50px;
|
| 92 |
margin-right: 10px;
|
| 93 |
}
|
| 94 |
-
.header
|
| 95 |
font-size: 24px;
|
| 96 |
-
color: #4CAF50;
|
| 97 |
margin: 0;
|
| 98 |
|
| 99 |
</style>
|
|
@@ -101,7 +102,7 @@ st.markdown("""
|
|
| 101 |
|
| 102 |
st.markdown("""
|
| 103 |
<div class="header">
|
| 104 |
-
<img src="
|
| 105 |
<h1>Daily Mirror News Analyzer</h1>
|
| 106 |
</div>
|
| 107 |
""", unsafe_allow_html=True)
|
|
@@ -289,9 +290,20 @@ with tab2:
|
|
| 289 |
st.write(f"Confidence: {result['score']:.2f}")
|
| 290 |
else:
|
| 291 |
st.error("Please enter a question.")
|
| 292 |
-
|
| 293 |
|
| 294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
with tab3:
|
| 296 |
st.header("Advanced Features")
|
| 297 |
st.write("Explore additional functionalities to enhance your news analysis.")
|
|
|
|
| 86 |
display: flex;
|
| 87 |
align-items: center;
|
| 88 |
margin-bottom: 20px;
|
| 89 |
+
colour : #2196F3
|
| 90 |
}
|
| 91 |
.header img {
|
| 92 |
+
height: 50px;
|
| 93 |
margin-right: 10px;
|
| 94 |
}
|
| 95 |
+
.header h1 {
|
| 96 |
font-size: 24px;
|
| 97 |
+
color: #4CAF50;
|
| 98 |
margin: 0;
|
| 99 |
|
| 100 |
</style>
|
|
|
|
| 102 |
|
| 103 |
st.markdown("""
|
| 104 |
<div class="header">
|
| 105 |
+
<img src="news_logo.jpeg" alt="Logo">
|
| 106 |
<h1>Daily Mirror News Analyzer</h1>
|
| 107 |
</div>
|
| 108 |
""", unsafe_allow_html=True)
|
|
|
|
| 290 |
st.write(f"Confidence: {result['score']:.2f}")
|
| 291 |
else:
|
| 292 |
st.error("Please enter a question.")
|
|
|
|
| 293 |
|
| 294 |
|
| 295 |
+
# Question Answering section
|
| 296 |
+
st.header("Ask Questions Based on Your News Content")
|
| 297 |
+
context_1 = st.text_area("Enter the news content (context):")
|
| 298 |
+
question_1 = st.text_input("Enter your question:")
|
| 299 |
+
|
| 300 |
+
if st.button("Get Answer"):
|
| 301 |
+
if context_1 and question_1:
|
| 302 |
+
answer_1 = qa_pipeline({'context': context, 'question': question})
|
| 303 |
+
st.success(f"Answer: {answer_1['answer']}")
|
| 304 |
+
else:
|
| 305 |
+
st.warning("Provide both context and question.")
|
| 306 |
+
|
| 307 |
with tab3:
|
| 308 |
st.header("Advanced Features")
|
| 309 |
st.write("Explore additional functionalities to enhance your news analysis.")
|