Update app.py
Browse files
app.py
CHANGED
|
@@ -49,13 +49,41 @@ should_save = st.sidebar.checkbox("💾 Save", value=True)
|
|
| 49 |
# Function to add witty and humor buttons
|
| 50 |
def add_witty_humor_buttons():
|
| 51 |
with st.expander("Wit and Humor 🤣", expanded=True):
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
# Function to Stream Inference Client for Inference Endpoint Responses
|
| 61 |
def StreamLLMChatResponse(prompt):
|
|
|
|
| 49 |
# Function to add witty and humor buttons
|
| 50 |
def add_witty_humor_buttons():
|
| 51 |
with st.expander("Wit and Humor 🤣", expanded=True):
|
| 52 |
+
|
| 53 |
+
# Button for Generating Limericks
|
| 54 |
+
limerick_description = "Write ten random adult limericks based on quotes that are tweet length and make you laugh 🎭"
|
| 55 |
+
if st.button("Generate Limericks 😂"):
|
| 56 |
+
StreamLLMChatResponse(limerick_description)
|
| 57 |
+
|
| 58 |
+
# Button for Wise Quotes
|
| 59 |
+
wise_description = "Generate ten wise quotes that are tweet length 🦉"
|
| 60 |
+
if st.button("Wise Quotes 🧙"):
|
| 61 |
+
StreamLLMChatResponse(wise_description)
|
| 62 |
+
|
| 63 |
+
# Button for Funny Rhymes
|
| 64 |
+
rhyme_description = "Create ten funny rhymes that are tweet length 🎶"
|
| 65 |
+
if st.button("Funny Rhymes 🎤"):
|
| 66 |
+
StreamLLMChatResponse(rhyme_description)
|
| 67 |
+
|
| 68 |
+
# Button for Medical Jokes
|
| 69 |
+
medical_description = "Create ten medical jokes that are tweet length 🏥"
|
| 70 |
+
if st.button("Medical Jokes 💉"):
|
| 71 |
+
StreamLLMChatResponse(medical_description)
|
| 72 |
+
|
| 73 |
+
# Button for Minnesota Humor
|
| 74 |
+
minnesota_description = "Create ten jokes about Minnesota that are tweet length 🌨️"
|
| 75 |
+
if st.button("Minnesota Humor ❄️"):
|
| 76 |
+
StreamLLMChatResponse(minnesota_description)
|
| 77 |
+
|
| 78 |
+
# Button for Top Funny Stories
|
| 79 |
+
funny_stories_description = "Create ten funny stories that are tweet length 📚"
|
| 80 |
+
if st.button("Top Funny Stories 📖"):
|
| 81 |
+
StreamLLMChatResponse(funny_stories_description)
|
| 82 |
+
|
| 83 |
+
# Button for Funny Rhymes (another one)
|
| 84 |
+
funny_rhymes_description = "Create ten more funny rhymes that are tweet length 🎵"
|
| 85 |
+
if st.button("More Funny Rhymes 🎙️"):
|
| 86 |
+
StreamLLMChatResponse(funny_rhymes_description)
|
| 87 |
|
| 88 |
# Function to Stream Inference Client for Inference Endpoint Responses
|
| 89 |
def StreamLLMChatResponse(prompt):
|