aidademo / resources.py
stonapse64
Wrong link in the Urly Murly article corrected.
30f1015
# A file containing text resources, asset links and examples for the aida demo apps.
# Bellamy Bowie
bellamy_bowie_description = """
<h1>Let Bellamy Bowie sense the target personas of your messages!</h1><br>
Step in and meet the one and only, the enigmatic Bellamy Bowie - a digital dynamo with a flair for the fabulous and a penchant for personality profiling! <br><br>
Bellamy doesn't just read tea leaves; She reads targets! Whether it's a tech-savvy millennial or a buttoned-up executive
, Bellamy Bowie sniffs out their digital footprints faster than a caffeinated squirrel on Wi-Fi steroids.<br><br><br>
"""
bellamy_bowie_hero = "https://images.nightcafe.studio/jobs/Vu8L5flHfXRI2WQ0mifU/Vu8L5flHfXRI2WQ0mifU--4--lmvzs.jpg"
bellamy_bowie_examples = [
["Smart Infrastructure: Technology to transform the everyday. Demographic change, urbanization, glocalization, environmental change, resource efficiency, and digitalization are presenting new challenges and opportunities. Smart Infrastructure addresses these topics by combining the real and the digital worlds. Our technology transforms infrastructure at speed and scale, enabling collaborative ecosystems to accelerate our customers’ digital journey. To deliver on infrastructure transition at speed and scale, we put digitalization and technology at the heart of our approach and empower our customers to scale sustainable impact. Together, we create energy efficiency – through CO2 transparency, renewable integration, and electrification. We help customers to improve asset performance, availability, and reliability, through resource-efficient and circular products which optimize production and supply chains throughout their entire lifecycle. We enable them to offer safe and comfortable environments that understand and adapt to the needs of their users."],
["Hacking for Siemens: After a successful opening hackathon at the Siemens headquarters in Munich, the wait for a second one did not take long. The global event in Prague included an even larger audience and exciting use cases with a common goal: solving real-life business problems across Siemens with ecosystems and co-creation."],
["Power-system automation is the act of automatically controlling the power system via instrumentation and control devices. Substation automation refers to using data from Intelligent electronic devices (IED), control and automation capabilities within the substation, and control commands from remote users to control power-system devices.Since full substation automation relies on substation integration, the terms are often used interchangeably. Power-system automation includes processes associated with generation and delivery of power. Monitoring and control of power delivery systems in the substation and on the pole reduce the occurrence of outages and shorten the duration of outages that do occur. The IEDs, communications protocols, and communications methods, work together as a system to perform power-system automation. The term “power system” describes the collection of devices that make up the physical systems that generate, transmit, and distribute power. The term “instrumentation and control (I&C) system” refers to the collection of devices that monitor, control, and protect the power system. Many power-system automation are monitored by SCADA."]
]
bellamy_bowie_note_quality = """<br><h3>A note on Bellamy Bowie's accuracy:</h3>
Bellamy's secret weapon is a typical NLP task called "zero-shot classification". This uses the general language understanding of an LLM to determine probabilities with which a selection of given labels fit the text. It is called "zero-shot" because the model has not been specifically trained on domain-specific text-label pairs. What initially sounds like a disadvantage can actually be a great advantage when determining whether a given text is suitable for the target group.<br><br>
You may now be wondering why that is.<br><br>
Well, if we, Siemens Communications, were to create text-target group pairs in order to fine-tune the LLM to our domain, then these text-target group pairs would represent our “wishful idea” of target group assignment. In other words: the LLM would be trained with a so-called bias. Bellamy, on the other hand, uses general language understanding based on training on a huge corpus of text to make her predictions. Bellamy Bowie is therefore free from the target group expectations of a Siemens communicator!<br><br>
But keep in mind that the text corpora of all major LLMs are also laden with a variety of biases! Manufacturers such as Open AI, Facebook, Google, Microsoft and others are trying to counteract these biases through more careful selection of training texts. But this is more of a recent trend and for now we have to assume that the bias problem still exists!<br>
"""
bellamy_bowie_article = """<br><h3>Discover which AI technologies are used for this demo and how easy it is to develop your own AI demo apps!</h3>
<ul>
<li>Check out the Hugging Face 🤗 introduction to <a href="https://huggingface.co/tasks/zero-shot-classification">Zero-Shot Classification</a> with transformers!</li>
<li>Discover Bellamy Bowie's secret weapon, the AI transformer model <a href="https://huggingface.co/facebook/bart-large-mnli">facebook/bart-large-mnli</a> with its checkpoint after being trained on the MultiNLI (MNLI) dataset!</li>
<li>Learn to develop your own AI apps with <a href="https://huggingface.co/learn/nlp-course/chapter9/1">Hugging Face</a> and <a href="https://www.gradio.app/">Gradio</a>!</li>
<li>Use the source code of our unerring Bellamy Bowie <a href="https://code.siemens.com/andreas.stein/aida-demos-use-cases">@code.siemens.com</a> to jump-start this exciting endeavor!</li>
</ul>
"""
# Urly & Murly Simmy
urly_murly_description = """
<h1>Introducing Urly and Murly Simmy: The Dynamic Duo of Digital Discernment!</h1><br>
In the bustling halls of Siemens, where servers hum and circuits sparkle, two AI agents stand out like binary stars:
Urly and Murly Simmy. Their mission? To scrutinize Siemens’ websites with the precision of a laser-guided soldering
iron and compare them to those of their competitors. 🌐<br><br>
Together, they form an unstoppable team — the Sherlock and Watson of the digital realm. When Siemens launches a new
product page, Urly would scan it like a caffeinated spider crawling through lines of HTML. Meanwhile, Murly would
cross-reference competitor sites, muttering, “Hmm, their call-to-action buttons are as elusive as Schrödinger’s cat.”
🐱<br><br><br>
"""
urly_murly_hero = "https://images.nightcafe.studio/jobs/I6xKuSphIsV23xzysP6r/I6xKuSphIsV23xzysP6r--3--thsxw.jpg"
urly_murly_examples = [
["https://www.siemens.com/global/en/products/energy/grid-software.html",
"https://www.siemens-energy.com/global/en/home/products-services/product-offerings/omnivise-digital-solutions.html"],
["https://press.siemens.com/global/en/pressrelease/siemens-increases-and-accelerates-sustainability-targets-and-investments",
"https://www.se.com/ww/en/about-us/newsroom/news/press-releases/schneider-electric-outperforms-2023-sustainability-targets-and-maintains-its-leadership-in-esg-ratings-65cc89b3ade55370f80f3013"],
["https://fr.wikipedia.org/wiki/R%C3%A2le_atlantis",
"https://en.wikipedia.org/wiki/Inaccessible_Island_rail"],
["https://www.blumenshop.com/flower-delivery/munich",
"https://en.wikipedia.org/wiki/Power-system_automation"]]
urly_murly_interpretation = """
<br><h3>Notes on interpreting the similarity scores</h3>
The similarity score ranges from -100 for completely different texts to 100 for identical texts. Comparing "I love you" with "I love you", yields a similarity score of 100. On the other hand, -100 is practically impossible to achieve. For example, comparing “I love you!” with “I hate you!” results in a similarity score of 56.57.<br><br>
Why is this so?<br><br>
Well, the AI technology used here works with so-called embeddings to represent texts in a hyperdimensional language space. To put it simply: the embeddings of two texts are like compass needles that show the direction of the compass for each text. The similarity measure is then the “angular difference” between the needle positions of two texts. “Both ‘I love you!’ and ‘I hate you!’ are self-referential statements, consisting of three words, and express very strong emotions. They likely appear frequently in contexts that depict interpersonal relationships. Therefore, they share a relatively high similarity.<br><br>
For your interpretation, this means that you should not look at a single measure of similarity between two individual sentences, but rather evaluate several sentences of larger texts. This is the only way to develop a certain feel for how this technology works over time so that you can ultimately use it fruitfully in your everyday life.<br><br>
"""
urly_murly_about_scraping = """
<br><h3>A note on extracting texts from website aka scraping:</h3>
Scraping is becoming more and more challenging these days because many companies are trying to protect their content from access they consider undesirable. To that end companies implement a variety of protection mechanisms.<br<br>
The Python library <a href="https://goose3.readthedocs.io/en/latest/index.html">goose3</a> used for extracting website texts in this demo is not equipped to bypass these protection mechanisms and often produces empty or incomplete extractions, especially for company websites.<br><br>
So if you see in this demo that the extraction shows incomplete results or just gibberish, then Urly and Murly have stumbled upon exactly these protections.<br<br>
Then please try another website!<br><br>
However, we plan to fine-tune this demo in future by using better scraping techniques and also enabling the comparison of texts that can be uploaded as files of pasted from the clipboard.<br<br>"""
urly_murly_article = """<br><h3>Discover which AI technologies are used for this demo and how easy it is to develop your own AI demo apps!</h3>
<ul>
<li>Check out the Hugging Face 🤗 introduction to <a href="https://huggingface.co/sentence-transformers">Sentence Transformers</a>, a Python framework for state-of-the-art sentence, text and image embeddings.</li>
<li>Learn to develop your own AI apps with <a href="https://huggingface.co/learn/nlp-course/chapter9/1">Hugging Face</a> and <a href="https://www.gradio.app/">Gradio</a>!</li>
<li>Use the source code of our sharp-sighted Urly and Murly Simmy <a href="https://code.siemens.com/andreas.stein/aida-demos-use-cases">@code.siemens.com</a> to jump-start your own, exciting app creations!</li>
</ul>
"""
# Ellis Cappy
ellis_cappy_description = """
<h1>Meet Ellis Cappy: The Quacktastic Caption Creator!</h1><br>
Why rely on lazy humans when you can have an AI duck with flair? 🤖🦆<br><br>
Ellis Cappy is on a mission to turn mundane visuals into quackingly good content and is the feathered genius behind our image captions! 📸🌟<br><br>
Our superior AI duck waddles through pixelated landscapes, its webbed feet tapping out witty one-liners faster than a duckling chasing breadcrumbs. 📝💨<br><br><br>
"""
ellis_cappy_hero = "https://images.nightcafe.studio/jobs/1tLpG6zZANbrgG4ds8wF/1tLpG6zZANbrgG4ds8wF--4--andnn.jpg"
ellis_cappy_examples = [
["https://assets.new.siemens.com/siemens/assets/api/uuid:44d7dd1b-0c97-4a1a-be13-7506bbe1c6ed/width:4320/44d7dd1b-0c97-4a1a-be13-7506bbe1c6ed.webp"],
["https://images.sw.cdn.siemens.com/siemens-disw-assets/public/5If52aTZJApP4ZmMGtqExa/en-US/heimon-kala_heimon_kala_76070_heroimage_1280x720_tcm27_59569.jpg"],
["https://assets.new.siemens.com/siemens/assets/api/uuid:e444e60c-f8c0-444c-ad8a-e88b05b359bf/width:640/quality:high/Energy-automation.webp"],
["https://assets.new.siemens.com/siemens/assets/api/uuid:7e606e7b-6dcb-44d0-b2cc-a6ca30adab34/width:1024/smo-blw-key-rendering-fixed.jpg"]
]
ellis_cappy_note_quality = """<br><h3>A note on Ellis Cappy's precision:</h3>
Ellis Cappy started at Siemens just last week and, like all newcomers, was overwhelmed by our extremely relaxed tone,
our galactic speed despite/ and our legendary complexity.
Ellis' captions may therefore be a bit stilted and off-topic.
But once she completes our rigorous new hire program, she will be able to fabulate fluently like all of us...
"""
ellis_cappy_article = """<br><h3>Discover which AI technologies are used for this demo and how easy it is to develop your own AI demo apps!</h3>
<ul>
<li>Read about the NLP task <a href="https://huggingface.co/tasks/image-to-text">image-to-text</a> with transformers!</li>
<li>Discover the AI transformer model <a href="https://huggingface.co/Salesforce/blip-image-captioning-base">Salesforce/blip-image-captioning-base</a> used for the Ellis Cappy demo!</li>
<li>Learn to develop your own AI apps with <a href="https://huggingface.co/learn/nlp-course/chapter9/1">Hugging Face</a> and <a href="https://www.gradio.app/">Gradio</a>!</li>
<li>Use the source code of our fascinating Ellis Cappy <a href="https://code.siemens.com/andreas.stein/aida-demos-use-cases">@code.siemens.com</a> to jump-start this exciting endeavor!</li>
</ul>
"""