NeonSamurai commited on
Commit
f11d1ad
·
verified ·
1 Parent(s): 9e21a12

Update facts.py

Browse files
Files changed (1) hide show
  1. facts.py +67 -22
facts.py CHANGED
@@ -1,23 +1,68 @@
1
- import random
2
- import streamlit as st
3
-
4
-
5
- nlp_facts = [
6
- "Did you know? Over 7000 languages are spoken in the world today!",
7
- "Google Translate processes over 100 billion words every day.",
8
- "The first NLP program, ELIZA, was created in 1966 as a chatbot simulation.",
9
- "Sentiment analysis can help predict stock market trends using tweets!",
10
- "NLP is used in healthcare to analyze patient feedback and clinical notes.",
11
- ]
12
-
13
- def show_fun_fact():
14
- """Display a random NLP fun fact."""
15
-
16
- st.sidebar.markdown("### 🤓 NLP Fun Fact")
17
- if "fact" not in st.session_state:
18
- st.session_state.fact = random.choice(nlp_facts)
19
-
20
- st.sidebar.markdown(f"**{st.session_state.fact}**")
21
-
22
- if st.sidebar.button("🔄"):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  st.session_state.fact = random.choice(nlp_facts)
 
1
+ import random
2
+ import streamlit as st
3
+
4
+
5
+ nlp_facts = [
6
+ "The term 'Natural Language Processing' was first coined in 1957.",
7
+ "ELIZA, the first chatbot, was created in 1966 by Joseph Weizenbaum and simulated a psychotherapist.",
8
+ "Siri, Apple's virtual assistant, was introduced in 2011 and is powered by NLP.",
9
+ "NLP powers spam filters that block over 100 billion spam emails daily!",
10
+ "Sentiment analysis helped predict the outcome of the 2016 U.S. presidential election by analyzing tweets.",
11
+ "Google's BERT model, introduced in 2019, can process text in over 100 languages.",
12
+ "NLP is used to analyze over 500 million tweets daily on platforms like Twitter.",
13
+ "Language models like GPT can generate poems, songs, and even short stories.",
14
+ "Microsoft Word's spell checker is an early example of NLP in everyday use.",
15
+ "NLP helps Netflix provide personalized recommendations by analyzing user reviews.",
16
+ "There are over 7,000 languages spoken in the world today, and NLP tools aim to process as many as possible.",
17
+ "Google Translate processes over 100 billion words every day!",
18
+ "NLP plays a vital role in self-driving cars, enabling them to understand road signs and verbal commands.",
19
+ "Text summarization algorithms can condense entire books into concise summaries within seconds.",
20
+ "By 2025, the NLP market is projected to grow to over $43 billion.",
21
+ "Virtual assistants like Alexa and Siri rely heavily on NLP to process speech in real time.",
22
+ "Facebook uses NLP to moderate millions of comments daily for abusive or inappropriate content.",
23
+ "NLP algorithms can detect fake reviews with over 90% accuracy.",
24
+ "Translation systems today can convert text between over 200 languages instantly.",
25
+ "NLP is helping combat cyberbullying by identifying harmful messages.",
26
+ "OpenAI’s GPT-4 model can handle over 25,000 words of context, a massive improvement over earlier models.",
27
+ "NLP-powered chatbots can reduce customer service costs by 30%.",
28
+ "NLP helps analyze customer feedback to improve products and services in industries worldwide.",
29
+ "NLP tools are being developed to help endangered languages survive by digitizing them.",
30
+ "Sentiment analysis can analyze movie reviews and predict box office success with surprising accuracy.",
31
+ "Word embeddings like Word2Vec and GloVe revolutionized NLP by giving words numerical representations.",
32
+ "Healthcare systems use NLP to analyze doctor’s notes and improve patient care.",
33
+ "NLP helps financial institutions detect fraudulent transactions by analyzing emails and messages.",
34
+ "The average person speaks 15,000 words per day, and NLP helps machines process all of it.",
35
+ "NLP models are trained on datasets with billions of words, including entire books and web pages.",
36
+ "Voice-to-text transcription accuracy has surpassed 95% for some models.",
37
+ "NLP powers optical character recognition (OCR), turning scanned text into editable digital text.",
38
+ "Real-time translation apps, powered by NLP, allow people to converse in different languages instantly.",
39
+ "NLP is being used in e-commerce to analyze customer reviews and recommend products.",
40
+ "The first machine translation system was developed in 1954 and translated 250 words from Russian to English.",
41
+ "Text-to-speech systems rely on NLP to understand punctuation and natural pauses in text.",
42
+ "NLP models can be fine-tuned for specific industries, like law, medicine, and finance.",
43
+ "NLP helps content creators optimize their writing for search engines with SEO recommendations.",
44
+ "Deep learning models like transformers revolutionized NLP with unparalleled accuracy.",
45
+ "NLP is used in law enforcement to analyze crime reports and predict trends.",
46
+ "ChatGPT, based on OpenAI’s GPT models, has over 175 billion parameters.",
47
+ "NLP tools can summarize legal documents, saving hours of manual work.",
48
+ "NLP is at the core of voice commands used in gaming consoles like PlayStation and Xbox.",
49
+ "Humans can read at an average speed of 250 words per minute, but NLP systems process millions of words per second.",
50
+ "NLP is being used to analyze climate change reports and create actionable insights for policymakers.",
51
+ "Social media platforms use NLP to detect and remove hate speech automatically.",
52
+ "Sentiment analysis can predict trends in the stock market by analyzing news headlines.",
53
+ "NLP helps create subtitles for movies and TV shows in multiple languages.",
54
+ "Smart home devices like Google Home and Amazon Echo use NLP to interpret commands.",
55
+ "Companies use NLP to analyze call center conversations for quality assurance.",
56
+ ]
57
+
58
+ def show_fun_fact():
59
+ """Display a random NLP fun fact."""
60
+
61
+ st.sidebar.markdown("### 🤓 NLP Fun Fact")
62
+ if "fact" not in st.session_state:
63
+ st.session_state.fact = random.choice(nlp_facts)
64
+
65
+ st.sidebar.markdown(f"**{st.session_state.fact}**")
66
+
67
+ if st.sidebar.button("🔄"):
68
  st.session_state.fact = random.choice(nlp_facts)