import gradio as gr import json from datetime import datetime # Sample data for the blog entries blog_entries = [ { "id": 1, "title": "Talk to your AI like a 'bro'", "content": "Because talking like a 'bro' to ya ai make yo ai tawk likka bro", "date": "2025-07-01", "category": "Romance & Relationships" }, { "id": 2, "title": "Have AI Explain Quantum Physics Using Only Emojis", "content": "🔬⚛️🤔 = 🧠💥. Challenge your AI to break down the most complex scientific concepts using nothing but tiny pictures. Results may vary from enlightening to completely incomprehensible.", "date": "2025-07-02", "category": "Science & Education" }, { "id": 3, "title": "Ask AI to bust a dad joke about itself", "content": "Ask your ai to bust a dad joke about itself, because, why not?", "date": "2025-07-03", "category": "Fashion & Style" }, { "id": 4, "title": "Have AI Write a Serious Business Email About Your Pet's Demands", "content": "Transform your cat's 3 AM zoomies into a professional complaint letter. Your AI secretary will help draft the most formal correspondence about treats and belly rubs.", "date": "2025-07-04", "category": "Pets & Animals" }, { "id": 5, "title": "Insult AI when it get 'how many r's are in strawberry' wrong", "content": "Because it is a good way to let out some anger on something without feelings", "date": "2025-06-30", "category": "Health & Fitness" }, { "id": 6, "title": "Have AI Write a Yelp Review for Your Own House", "content": "Rate your living space like a disappointed customer. '2 stars - bathroom has no room service, kitchen staff (me) is terrible, would not recommend.'", "date": "2025-06-29", "category": "Home & Living" }, { "id": 7, "title": "Ask AI to Translate Your Grocery List into Shakespearean English", "content": "Transform mundane shopping into an epic quest. 'Wherefore art thou, organic kale?' becomes the battle cry of your noble supermarket adventure.", "date": "2025-06-28", "category": "Food & Cooking" }, { "id": 8, "title": "Have AI Create a LinkedIn Profile for Your Favorite Fictional Character", "content": "Help Sherlock Holmes network professionally or give Batman the corporate presence he deserves. Watch AI struggle with employment gaps and unconventional work experiences.", "date": "2025-06-27", "category": "Career & Professional" }, { "id": 9, "title": "Get AI to write a Sherlock Holmes style story about all the toilet paper finishing", "content": "Toilet paper finishing is a serious business, and serious business is what Sherlock Holmes is all about", "date": "2025-07-05", "category": "Missing TP & Sherlock Holmes" } ] def create_blog_entry_html(entry): """Create HTML for a single blog entry""" return f"""

#{entry['id']}: {entry['title']}

{entry['category']}

{entry['content']}

📅 {entry['date']}
🚀 Try it here
""" def get_all_entries(): """Return all blog entries as HTML""" html_content = """

🐧 101 Dumb And Stupid Things To Do With An AI 🤖

A collection of hilariously pointless AI experiments for your entertainment

Total entries: {}/101

""".format(len(blog_entries)) # Sort entries by ID (newest first) sorted_entries = sorted(blog_entries, key=lambda x: x['id'], reverse=True) for entry in sorted_entries: html_content += create_blog_entry_html(entry) html_content += "
" return html_content def filter_by_category(category): """Filter entries by category""" if category == "All Categories": return get_all_entries() filtered_entries = [entry for entry in blog_entries if entry['category'] == category] html_content = f"""

🐧 101 Dumb And Stupid Things To Do With An AI 🤖

Category: {category}

Showing {len(filtered_entries)} entries

""" sorted_entries = sorted(filtered_entries, key=lambda x: x['id'], reverse=True) for entry in sorted_entries: html_content += create_blog_entry_html(entry) html_content += "
" return html_content def search_entries(query): """Search entries by title or content""" if not query.strip(): return get_all_entries() query_lower = query.lower() filtered_entries = [ entry for entry in blog_entries if query_lower in entry['title'].lower() or query_lower in entry['content'].lower() ] html_content = f"""

🐧 101 Dumb And Stupid Things To Do With An AI 🤖

Search results for: "{query}"

Found {len(filtered_entries)} entries

""" if not filtered_entries: html_content += """

No entries found 😅

Try searching for something else or browse all categories!

""" else: sorted_entries = sorted(filtered_entries, key=lambda x: x['id'], reverse=True) for entry in sorted_entries: html_content += create_blog_entry_html(entry) html_content += "
" return html_content # Get unique categories for the dropdown categories = ["All Categories"] + sorted(list(set(entry['category'] for entry in blog_entries))) # Create the Gradio interface with gr.Blocks(title="101 Dumb And Stupid Things To Do With An AI", theme=gr.themes.Soft()) as demo: gr.HTML("""

🐧 ReallyFloppyPenguin's AI Shenanigans 🤖

101 Dumb And Stupid Things To Do With An AI

""") with gr.Row(): with gr.Column(scale=1): category_dropdown = gr.Dropdown( choices=categories, value="All Categories", label="Filter by Category", interactive=True ) with gr.Column(scale=2): search_box = gr.Textbox( placeholder="Search entries...", label="Search", interactive=True ) with gr.Column(scale=1): search_btn = gr.Button("Search", variant="primary") blog_display = gr.HTML(value=get_all_entries()) # Event handlers category_dropdown.change( fn=filter_by_category, inputs=[category_dropdown], outputs=[blog_display] ) search_btn.click( fn=search_entries, inputs=[search_box], outputs=[blog_display] ) search_box.submit( fn=search_entries, inputs=[search_box], outputs=[blog_display] ) gr.HTML("""

🚀 More ridiculous AI experiments coming soon! Currently at {}/101 entries.

Have a dumb AI idea? Share it in the discussions!

""".format(len(blog_entries))) if __name__ == "__main__": demo.launch()