LakshmiHarika commited on
Commit
9db4a00
·
verified ·
1 Parent(s): c097004

Create pages/1.Introduction to NLP.py

Browse files
Files changed (1) hide show
  1. pages/1.Introduction to NLP.py +113 -0
pages/1.Introduction to NLP.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ st.markdown(
4
+ """
5
+ <style>
6
+ body {
7
+ background-color: #f9f9f9; /* Light gray background */
8
+ font-family: 'Arial', sans-serif;
9
+ }
10
+ @keyframes fadeIn {
11
+ 0% { opacity: 0; transform: translateY(-20px); }
12
+ 100% { opacity: 1; transform: translateY(0); }
13
+ }
14
+ .title {
15
+ text-align: center;
16
+ color: #2c3e50; /* Deep gray-blue */
17
+ font-size: 3rem;
18
+ font-weight: bold;
19
+ animation: fadeIn 1s ease-in-out;
20
+ }
21
+ .caption {
22
+ text-align: center;
23
+ font-style: italic;
24
+ font-size: 1.2rem;
25
+ color: #7f8c8d; /* Soft gray */
26
+ animation: fadeIn 1.5s ease-in-out;
27
+ }
28
+ .section {
29
+ font-size: 1.1rem;
30
+ text-align: justify;
31
+ line-height: 1.8;
32
+ color: #34495e; /* Muted gray */
33
+ background: #ffffff; /* White card-style background */
34
+ padding: 20px;
35
+ border-radius: 10px;
36
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
37
+ animation: fadeIn 2s ease-in-out;
38
+ margin: 10px 0;
39
+ }
40
+ .image-container {
41
+ text-align: center;
42
+ margin: 20px 0;
43
+ animation: fadeIn 2.5s ease-in-out;
44
+ }
45
+ .image-container img {
46
+ border-radius: 15px;
47
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
48
+ transition: transform 0.3s ease-in-out;
49
+ }
50
+ .image-container img:hover {
51
+ transform: scale(1.05); /* Subtle zoom effect */
52
+ }
53
+ </style>
54
+ """,
55
+ unsafe_allow_html=True,
56
+ )
57
+
58
+
59
+ st.markdown("<div class='title'>Introduction to Natural Language Processing</div>", unsafe_allow_html=True)
60
+
61
+
62
+ st.markdown(
63
+ "<div class='caption'>Empowering Machines to Understand and Communicate in Human Language!</div>",
64
+ unsafe_allow_html=True,
65
+ )
66
+
67
+ st.markdown(
68
+ """
69
+ <div class='image-container'>
70
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/66bde9bf3c885d04498227a0/AYjss7I_gYg8OuSg5rqq3.jpeg" alt="NLP Image" width="400">
71
+ </div>
72
+ """,
73
+ unsafe_allow_html=True,
74
+ )
75
+
76
+ st.subheader(":blue[What is NLP?]")
77
+ st.markdown(
78
+ '''
79
+ <div class='section'>
80
+ <b>Natural Language Processing (NLP)</b> is a dynamic field of Artificial Intelligence (AI) focused on enabling computers
81
+ to understand, interpret, and generate human language. It bridges the gap between how humans communicate and how machines process information.
82
+ </div>
83
+ ''',
84
+ unsafe_allow_html=True,
85
+ )
86
+ st.markdown('''
87
+ - To represent text in numerical and tabular format it is going to use a field known as NLP.
88
+ - It is a sub-field in AI which guides the machine to process and analyze the natural language
89
+ ''')
90
+
91
+
92
+ st.subheader(":red[Applications of NLP]")
93
+ st.markdown(
94
+ '''
95
+ <div class='section'>
96
+ NLP powers many everyday applications, including:
97
+ <ul>
98
+ <li><b>Chatbots and Virtual Assistants:</b> Enhancing customer support with intelligent responses.</li>
99
+ <li><b>Language Translation:</b> Breaking language barriers with tools like Google Translate.</li>
100
+ <li><b>Sentiment Analysis:</b> Analyzing opinions and emotions in social media and reviews.</li>
101
+ <li><b>Search Engines:</b> Understanding queries to deliver relevant results.</li>
102
+ </ul>
103
+ </div>
104
+ ''',
105
+ unsafe_allow_html=True,
106
+ )
107
+
108
+ st.markdown(
109
+ """
110
+ <div class='caption'>Step into the world of NLP and discover the endless possibilities of language-driven innovation!...</div>
111
+ """,
112
+ unsafe_allow_html=True,
113
+ )