ArturoNereu commited on
Commit
2f6d0e9
·
1 Parent(s): c71a833

added brief embeddings explanation

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -44,6 +44,22 @@ with gr.Blocks(theme="soft") as app:
44
  gr.Markdown("# Emojilator 🦖")
45
  gr.Markdown("Transform your text by adding relevant emojis! This tool uses AI to understand your text and adds matching emojis to make it more expressive.")
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  with gr.Row():
48
  with gr.Column(scale=1):
49
  gr.Image("Frida_Dino.png", elem_id="mascot", show_label=False)
 
44
  gr.Markdown("# Emojilator 🦖")
45
  gr.Markdown("Transform your text by adding relevant emojis! This tool uses AI to understand your text and adds matching emojis to make it more expressive.")
46
 
47
+ # Embeddings explanation (full version)
48
+ gr.Markdown("""
49
+ ### About this Space 🧠
50
+ This is a simple Space to help build intuition around the concept of **embeddings**.
51
+
52
+ Most of the magic behind LLMs for developers revolves around understanding this concept: converting data into a numeric representation, or a vector.
53
+
54
+ For example, the word *apple* could become `[8348832, 3423943, 923493294]`. If we use the 🍎 emoji, its embedding might be `[432432, 43423, 3423423]`. When we calculate the distance between them, they're close!
55
+
56
+ In this demo, we use that distance to replace words with relevant emojis. What's interesting is that it's not only about exact matches—if you write "I want ICE CREAM", you might get 🍦, not 🧊 + 🧴.
57
+
58
+ This means we're capturing **meaning (semantics)**, not just character-to-character equality.
59
+
60
+ Check the Space source code to learn more about the implementation.
61
+ """)
62
+
63
  with gr.Row():
64
  with gr.Column(scale=1):
65
  gr.Image("Frida_Dino.png", elem_id="mascot", show_label=False)