Spaces:
Sleeping
Sleeping
Update src/about.py (#28)
Browse files- Update src/about.py (7c06e6b5265441c9623fc909d2e366a546f64c6d)
Co-authored-by: Muhammad Khaqan Nasir <[email protected]>
- src/about.py +97 -116
src/about.py
CHANGED
@@ -1,135 +1,116 @@
|
|
1 |
import streamlit as st
|
2 |
-
import os # Missing import added
|
3 |
|
4 |
-
# Set page configuration
|
5 |
-
st.set_page_config(
|
6 |
-
page_title="About Us | AI News Generator",
|
7 |
-
page_icon="π",
|
8 |
-
layout="wide",
|
9 |
-
initial_sidebar_state="collapsed"
|
10 |
-
)
|
11 |
-
|
12 |
-
# Main Function
|
13 |
def main():
|
14 |
-
#
|
15 |
st.markdown("""
|
16 |
<style>
|
17 |
-
|
18 |
-
html, body, [class*="css"], * {
|
19 |
-
font-family: 'Poppins', sans-serif;
|
20 |
-
}
|
21 |
-
</style>
|
22 |
-
""", unsafe_allow_html=True)
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
At **AI News Generator**, we aim to revolutionize the way news is created and consumed.
|
37 |
-
By leveraging cutting-edge **Generative AI**, we aspire to provide **reliable, real-time, and personalized news content** that empowers individuals and organizations worldwide.
|
38 |
-
We envision a world where technology enhances the accessibility and quality of information for everyone.
|
39 |
-
""")
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
"linkedin": "khaqan-nasir",
|
57 |
-
"image": os.path.join(os.path.dirname(__file__), 'assets', 'member01.jpg')
|
58 |
-
},
|
59 |
-
{
|
60 |
-
"name": "Muhammad Adnan Tariq",
|
61 |
-
"github": "adnaan-tariq",
|
62 |
-
"linkedin": "adnaantariq",
|
63 |
-
"image": os.path.join(os.path.dirname(__file__), 'assets', 'member02.JPG')
|
64 |
-
},
|
65 |
-
{
|
66 |
-
"name": "Muhammad Ibtisiam Afzal",
|
67 |
-
"github": "ibtisamafzal",
|
68 |
-
"linkedin": "ibtisamafzal",
|
69 |
-
"image": os.path.join(os.path.dirname(__file__), 'assets', 'member03.JPG')
|
70 |
}
|
71 |
-
]
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
encoded_image = encode_image(member['image'])
|
78 |
-
|
79 |
-
# HTML structure with background color and adjusted image height
|
80 |
-
st.markdown(f"""
|
81 |
-
<div style='background-color: #f8f9fa; border-radius: 10px; padding: 20px; margin-bottom: 20px; text-align: center;'>
|
82 |
-
<div style='background-color: #ffffff; border-radius: 50%; width: 200px; height: 200px; margin: 0 auto; display: flex; justify-content: center; align-items: center;'>
|
83 |
-
<img src="data:image/jpeg;base64,{encoded_image}" alt="{member['name']}" style='width: 100%; height: 100%; object-fit: cover; border-radius: 50%;'>
|
84 |
-
</div>
|
85 |
-
<div style='font-size: 22px; font-weight: 600; color: #5F6366; margin-top: 10px;'>{member['name']}</div>
|
86 |
-
<div style='font-size: 18px; color: #5F6366; margin-top: 5px;'>
|
87 |
-
<a href='https://github.com/{member["github"]}' target='_blank' style='font-size: 20px; color: #000000; margin-right: 10px;'>
|
88 |
-
<i class="fab fa-github" style="font-size: 20px; color: #000000; margin-right: 5px;"></i> GitHub
|
89 |
-
</a>
|
90 |
-
<a href='https://linkedin.com/in/{member["linkedin"]}' target='_blank' style='font-size: 20px; color: #0077B5;'>
|
91 |
-
<i class="fab fa-linkedin" style="font-size: 20px; color: #0077B5; margin-right: 5px;"></i> LinkedIn
|
92 |
-
</a>
|
93 |
-
</div>
|
94 |
-
</div>
|
95 |
-
""", unsafe_allow_html=True)
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
Below are some key technologies that power **AI News Generator**:
|
103 |
-
- **Streamlit**: For building the user interface.
|
104 |
-
- **Natural Language Processing (NLP)**: For generating accurate and readable news content.
|
105 |
-
- **Free APIs and Open-Source Models**: To make the app cost-efficient and widely accessible.
|
106 |
-
- **Python Libraries**: For seamless backend integration and feature enhancement.
|
107 |
-
""")
|
108 |
|
109 |
-
# Section 5: Why Choose Us?
|
110 |
-
st.markdown("---")
|
111 |
-
st.markdown("<h2 style='font-size: 30px;'>π‘ Why Choose Us?</h2>", unsafe_allow_html=True)
|
112 |
-
st.write("""
|
113 |
-
- **Free and Accessible**: We use free resources to ensure accessibility for all users.
|
114 |
-
- **Real-Time News**: Generate fresh, personalized news in seconds.
|
115 |
-
- **Innovative AI**: Powered by state-of-the-art generative AI.
|
116 |
-
- **User-Centric Design**: Intuitive and simple to use for anyone.
|
117 |
-
""")
|
118 |
|
119 |
-
#
|
120 |
-
st.markdown("
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
126 |
|
127 |
-
#
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
-
# Run the app
|
134 |
if __name__ == "__main__":
|
135 |
main()
|
|
|
1 |
import streamlit as st
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
def main():
|
4 |
+
# Custom CSS for About page
|
5 |
st.markdown("""
|
6 |
<style>
|
7 |
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
.stApp {
|
10 |
+
font-family: 'Poppins', sans-serif;
|
11 |
+
background: #f8fafc;
|
12 |
+
min-height: 100vh;
|
13 |
+
color: #1a202c;
|
14 |
+
}
|
15 |
+
|
16 |
+
#MainMenu {visibility: visible;}
|
17 |
+
footer {visibility: hidden;}
|
18 |
+
.stDeployButton {display: none;}
|
19 |
+
header {visibility: hidden;}
|
20 |
+
.stApp > header {visibility: hidden;}
|
21 |
+
|
22 |
+
.container {
|
23 |
+
max-width: 1200px;
|
24 |
+
margin: 0 auto;
|
25 |
+
padding: 1.5rem;
|
26 |
+
}
|
27 |
+
|
28 |
+
.header {
|
29 |
+
padding: 1.5rem 0;
|
30 |
+
text-align: center;
|
31 |
+
}
|
32 |
|
33 |
+
.header-title {
|
34 |
+
font-size: 2.5rem;
|
35 |
+
font-weight: 700;
|
36 |
+
color: #1a202c;
|
37 |
+
display: inline-flex;
|
38 |
+
align-items: center;
|
39 |
+
gap: 0.5rem;
|
40 |
+
}
|
41 |
|
42 |
+
.section {
|
43 |
+
margin-bottom: 2rem;
|
44 |
+
}
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
.section-title {
|
47 |
+
font-size: 2rem;
|
48 |
+
font-weight: 600;
|
49 |
+
color: #1a202c;
|
50 |
+
margin-bottom: 0.5rem;
|
51 |
+
display: flex;
|
52 |
+
align-items: center;
|
53 |
+
gap: 0.5rem;
|
54 |
+
}
|
55 |
|
56 |
+
.section-text {
|
57 |
+
font-size: 1.1rem;
|
58 |
+
color: #4a5568;
|
59 |
+
line-height: 1.5;
|
60 |
+
max-width: 800px;
|
61 |
+
margin: 0 auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
|
|
63 |
|
64 |
+
.stSidebar {
|
65 |
+
background: #ffffff;
|
66 |
+
border-right: 1px solid #e5e7eb;
|
67 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
+
.stSidebar .sidebar-content {
|
70 |
+
padding: 1rem;
|
71 |
+
}
|
72 |
+
</style>
|
73 |
+
""", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
+
# Header
|
77 |
+
st.markdown("""
|
78 |
+
<div class="header">
|
79 |
+
<div class="container">
|
80 |
+
<h1 class="header-title">π‘οΈ TruthCheck</h1>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
""", unsafe_allow_html=True)
|
84 |
|
85 |
+
# About Content
|
86 |
+
st.markdown("""
|
87 |
+
<div class="container">
|
88 |
+
<div class="section">
|
89 |
+
<h2 class="section-title">βΉοΈ About TruthCheck</2>
|
90 |
+
<p class="section-text">
|
91 |
+
TruthCheck is an advanced fake news detection platform powered by cutting-edge AI technology. Our mission is to empower users to distinguish between authentic information and misinformation in an era of digital overload.
|
92 |
+
</p>
|
93 |
+
</div>
|
94 |
+
<div class="section">
|
95 |
+
<h3 class="section-title">π Our Mission</h3>
|
96 |
+
<p class="section-text">
|
97 |
+
We aim to combat misinformation by providing a reliable, user-friendly tool that analyzes news articles with high accuracy. TruthCheck leverages a hybrid BERT-BiLSTM model to detect linguistic patterns and contextual cues, ensuring you can trust the news you read.
|
98 |
+
</p>
|
99 |
+
</div>
|
100 |
+
<div class="section">
|
101 |
+
<h3 class="section-title">π§ Our Technology</h3>
|
102 |
+
<p class="section-text">
|
103 |
+
TruthCheck combines BERT's natural language understanding with BiLSTM's sequential processing to achieve state-of-the-art fake news detection. Our model analyzes text for credibility, sentiment, and context, delivering results with confidence scores and attention visualizations.
|
104 |
+
</p>
|
105 |
+
</div>
|
106 |
+
<div class="section">
|
107 |
+
<h3 class="section-title">π Why It Matters</h3>
|
108 |
+
<p class="section-text">
|
109 |
+
In a world where misinformation spreads rapidly, TruthCheck stands as a guardian of truth. Whether you're a journalist, researcher, or concerned citizen, our tool helps you make informed decisions by verifying the authenticity of news content.
|
110 |
+
</p>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
""", unsafe_allow_html=True)
|
114 |
|
|
|
115 |
if __name__ == "__main__":
|
116 |
main()
|