import gradio as gr from instapy import InstaPy import time import subprocess def run_instagram_bot(): # Initialize InstaPy session = InstaPy(username="", password="") # Set up your bot preferences # Enable story interaction session.set_do_story(enabled=True, percentage=100) session.set_do_comment(enabled=True, percentage=100) # Enable commenting # Customize comments session.set_comments( ["Nice!", "نام من فرید است و سلام به شما امیدوارم موفق باشید", "Amazing!", "🔥", "Hello My Name Is Farid :)...", "کارت عالی بود", "تو بهترینی", "اطلاعات شگفت انگیز"]) # Log in session.login() while True: # Like stories session.like_stories(amount=10) # Like 10 stories (adjust as needed) # Reply to stories session.reply_to_stories(["👍", "🔥"]) # Customize your replies # Gain followers # Follow followers of specific users session.follow_user_followers( ["user1", "user2"], amount=5, randomize=True) # Wait for 1 minute before the next iteration time.sleep(60) def trigger_instagram_bot(): # Run the extended Instagram bot script subprocess.Popen(["python", "instagram_bot_combined.py"]) return "Instagram bot started! It will like stories, leave comments, gain followers, and run every minute." iface = gr.Interface( fn=trigger_instagram_bot, inputs=None, outputs=gr.outputs.Textbox(label="Bot Status"), title="Instagram Bot: Auto Like, Comment, Follow & Schedule", description="Click the button to start the extended bot!", ) if __name__ == "__main__": iface.launch()