Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
# Set the title of the app
|
4 |
+
st.title("Mystery Emoji Translator")
|
5 |
+
|
6 |
+
# Define the emoji meanings as a dictionary
|
7 |
+
emoji_meanings = {
|
8 |
+
"π": "Magnifying Glass",
|
9 |
+
"π΅οΈββοΈ": "Detective (Female)",
|
10 |
+
"π΅οΈββοΈ": "Detective (Male)",
|
11 |
+
"π€": "Thinking Face",
|
12 |
+
"β": "Question Mark",
|
13 |
+
"β": "White Question Mark"
|
14 |
+
}
|
15 |
+
|
16 |
+
# Define the sidebar title and text
|
17 |
+
st.sidebar.title("About")
|
18 |
+
st.sidebar.write("This app translates mystery emojis into their meanings.")
|
19 |
+
|
20 |
+
# Add a selectbox to the sidebar with the available emojis
|
21 |
+
selected_emoji = st.sidebar.selectbox("Select an emoji", list(emoji_meanings.keys()))
|
22 |
+
|
23 |
+
# Display the selected emoji and its meaning
|
24 |
+
st.write("You selected:", selected_emoji)
|
25 |
+
st.write("Meaning:", emoji_meanings[selected_emoji])
|