AI-Powered Instagram Hashtag Generator GUI using Python – FuzzuTech Project

 Demo :


Click Video πŸ‘‡πŸ‘‡πŸ‘‡



























πŸ“Œ Features :

  • Built with Python using tkinter + customtkinter

  • Suggests viral Instagram hashtags by topic

  • Preloaded AI dataset with fallback logic

  • One-click clipboard copying

  • AI-ready code block for OpenAI integration

  • Dark Mode GUI interface

  • Perfect for creators, marketers, influencers, and developers

  • Fully offline compatible!


Code :


import tkinter as tk

from tkinter import messagebox

import customtkinter as ctk

import random


# Optional OpenAI Integration

# import openai


# openai.api_key = "YOUR_OPENAI_API_KEY"


# Set appearance

ctk.set_appearance_mode("System")

ctk.set_default_color_theme("blue")


# Sample Hashtag Dataset (Simulated AI Fallback)

hashtag_data = {

    "fitness": ["#FitnessLife", "#GymTime", "#WorkoutGoals", "#NoPainNoGain"],

    "travel": ["#Wanderlust", "#TravelDiaries", "#ExploreMore", "#AdventureTime"],

    "food": ["#Foodie", "#DeliciousEats", "#FoodLovers", "#TastyTreats"],

    "fashion": ["#OOTD", "#FashionVibes", "#StyleInspo", "#TrendSetter"],

    "coding": ["#PythonDev", "#100DaysOfCode", "#DevLife", "#CodeNewbie"],

    "pets": ["#CutePets", "#DogLovers", "#CatLovers", "#Petstagram"],

    "general": ["#InstaGood", "#ViralPost", "#ExplorePage", "#DailyVibes"]

}


def generate_hashtags():

    topic = topic_entry.get().lower()

    output.delete("1.0", tk.END)


    if topic in hashtag_data:

        tags = random.sample(hashtag_data[topic], k=3)

        output.insert(tk.END, " ".join(tags))


    else:

        # Optional: Generate using OpenAI if topic unknown

        # try:

        #     response = openai.Completion.create(

        #         engine="text-davinci-003",

        #         prompt=f"Generate 5 trending Instagram hashtags for topic: {topic}",

        #         max_tokens=50,

        #         temperature=0.7,

        #     )

        #     tags = response.choices[0].text.strip()

        #     output.insert(tk.END, tags)

        # except Exception as e:

        #     output.insert(tk.END, "OpenAI error. Showing default tags.\n")

        tags = random.sample(hashtag_data["general"], k=3)

        output.insert(tk.END, "Topic not found. Try these: " + " ".join(tags))


def copy_to_clipboard():

    root.clipboard_clear()

    root.clipboard_append(output.get("1.0", tk.END).strip())

    messagebox.showinfo("Copied", "Hashtags copied to clipboard!")


# Main GUI Window

root = ctk.CTk()

root.title("Instagram Hashtag Generator - AI Powered")

root.geometry("500x400")

root.resizable(False, False)


# Title

heading = ctk.CTkLabel(root, text="AI-Powered Instagram Hashtag Generator", font=("Arial", 18, "bold"))

heading.pack(pady=20)


# Input Field

topic_entry = ctk.CTkEntry(root, placeholder_text="Enter topic (e.g., travel, coding, food)", width=300, height=35)

topic_entry.pack(pady=10)


# Generate Button

generate_btn = ctk.CTkButton(root, text="Generate Hashtags", command=generate_hashtags, width=200)

generate_btn.pack(pady=10)


# Output Display

output = tk.Text(root, height=5, width=45, font=("Arial", 12))

output.pack(pady=10)


# Copy Button

copy_btn = ctk.CTkButton(root, text="Copy to Clipboard", command=copy_to_clipboard)

copy_btn.pack(pady=10)


# Footer

footer = ctk.CTkLabel(root, text="Developed by FuzzuTech", font=("Arial", 10))

footer.pack(side="bottom", pady=10)


root.mainloop()

Comments

Popular posts from this blog

πŸš€ Simple Login & Registration System in Python Tkinter πŸ“±

πŸš€ Create a Python Screen Recorder with Audio (Complete Code)

πŸ“‘ Fuzzu Packet Sniffer – Python GUI for Real-Time IP Monitoring | Tkinter + Scapy