awacke1 commited on
Commit
a857605
β€’
1 Parent(s): 58173f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -28
app.py CHANGED
@@ -50,40 +50,46 @@ should_save = st.sidebar.checkbox("πŸ’Ύ Save", value=True)
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):
 
50
  def add_witty_humor_buttons():
51
  with st.expander("Wit and Humor 🀣", expanded=True):
52
 
53
+ # Define button descriptions
54
+ descriptions = {
55
+ "Generate Limericks πŸ˜‚": "Write ten random adult limericks based on quotes that are tweet length and make you laugh 🎭",
56
+ "Wise Quotes πŸ§™": "Generate ten wise quotes that are tweet length πŸ¦‰",
57
+ "Funny Rhymes 🎀": "Create ten funny rhymes that are tweet length 🎢",
58
+ "Medical Jokes πŸ’‰": "Create ten medical jokes that are tweet length πŸ₯",
59
+ "Minnesota Humor ❄️": "Create ten jokes about Minnesota that are tweet length 🌨️",
60
+ "Top Funny Stories πŸ“–": "Create ten funny stories that are tweet length πŸ“š",
61
+ "More Funny Rhymes πŸŽ™οΈ": "Create ten more funny rhymes that are tweet length 🎡"
62
+ }
63
 
64
+ # Create columns
65
+ col1, col2, col3 = st.columns([1, 1, 1], gap="small")
 
 
66
 
67
+ # Add buttons to columns
68
+ if col1.button("Generate Limericks πŸ˜‚"):
69
+ StreamLLMChatResponse(descriptions["Generate Limericks πŸ˜‚"])
 
70
 
71
+ if col2.button("Wise Quotes πŸ§™"):
72
+ StreamLLMChatResponse(descriptions["Wise Quotes πŸ§™"])
 
 
73
 
74
+ if col3.button("Funny Rhymes 🎀"):
75
+ StreamLLMChatResponse(descriptions["Funny Rhymes 🎀"])
 
 
76
 
77
+ col4, col5, col6 = st.columns([1, 1, 1], gap="small")
 
 
 
78
 
79
+ if col4.button("Medical Jokes πŸ’‰"):
80
+ StreamLLMChatResponse(descriptions["Medical Jokes πŸ’‰"])
81
+
82
+ if col5.button("Minnesota Humor ❄️"):
83
+ StreamLLMChatResponse(descriptions["Minnesota Humor ❄️"])
84
+
85
+ if col6.button("Top Funny Stories πŸ“–"):
86
+ StreamLLMChatResponse(descriptions["Top Funny Stories πŸ“–"])
87
+
88
+ col7 = st.columns(1, gap="small")
89
+
90
+ if col7[0].button("More Funny Rhymes πŸŽ™οΈ"):
91
+ StreamLLMChatResponse(descriptions["More Funny Rhymes πŸŽ™οΈ"])
92
+
93
 
94
  # Function to Stream Inference Client for Inference Endpoint Responses
95
  def StreamLLMChatResponse(prompt):