KhaqanNasir commited on
Commit
7c06e6b
Β·
verified Β·
1 Parent(s): b6ea80d

Update src/about.py

Browse files
Files changed (1) hide show
  1. 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
- # Apply Poppins font across the app
15
  st.markdown("""
16
  <style>
17
- @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
18
- html, body, [class*="css"], * {
19
- font-family: 'Poppins', sans-serif;
20
- }
21
- </style>
22
- """, unsafe_allow_html=True)
23
 
24
- # Add Font Awesome CDN for icons
25
- st.markdown("""
26
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
27
- """, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
- # Title Section
30
- st.markdown("<h1 style='font-size: 60px; text-align: center;'>About Us</h1>", unsafe_allow_html=True)
31
- st.markdown("<p style='font-size: 20px; text-align: center; color: gray;'>Learn more about the vision, mission, and team behind the AI News Generator. πŸŒπŸ“°</p>", unsafe_allow_html=True)
 
 
 
 
 
32
 
33
- # Section 1: Our Vision
34
- st.markdown("<h2 style='font-size: 30px;'>🌟 Our Vision</h2>", unsafe_allow_html=True)
35
- st.write("""
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
- # Section 2: Our Mission
42
- st.markdown("---")
43
- st.markdown("<h2 style='font-size: 30px;'>πŸš€ Our Mission</h2>", unsafe_allow_html=True)
44
- st.write("""
45
- Our mission is simple: to deliver **AI-powered solutions** that make news creation faster, smarter, and more efficient.
46
- We believe in innovation, creativity, and the potential of AI to transform industries. Whether you're a journalist, an organization, or just someone seeking personalized content,
47
- **AI News Generator** is here to serve your needs with **accuracy, diversity, and creativity**.
48
- """)
 
49
 
50
- # Team Section
51
- st.header("Meet the Team")
52
- team_members = [
53
- {
54
- "name": "Muhammad Khaqan Nasir",
55
- "github": "KhaqanNasir",
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
- cols = st.columns(len(team_members))
74
- for col, member in zip(cols, team_members):
75
- with col:
76
- # Encode image to base64
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
- # Section 4: Technology Stack
98
- st.markdown("---")
99
- st.markdown("<h2 style='font-size: 30px;'>πŸ› οΈ Technology Stack</h2>", unsafe_allow_html=True)
100
- st.write("""
101
- Our app uses cutting-edge **Generative AI models** combined with open-source tools to ensure high-quality performance.
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
- # Footer
120
- st.markdown("---")
121
- st.markdown(
122
- '<p style="text-align: center; font-weight: 600; font-size: 16px;">πŸ’» Developed with ❀️ using Streamlit | Β© 2024</p>',
123
- unsafe_allow_html=True
124
- )
125
- st.sidebar.success("Select a page above.")
 
126
 
127
- # Function to encode image to base64
128
- def encode_image(image_path):
129
- with open(image_path, "rb") as image_file:
130
- import base64
131
- return base64.b64encode(image_file.read()).decode("utf-8")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()