vibrant_btn = gr.Button("🌈 Vibrant") street_btn = gr.Button("📸 Street") # Event handlers analyze_btn.click( fn=self.analyze_image_with_groq, inputs=[input_image], outputs=[prompt] ) portrait_btn.click( lambda: "artistic lifestyle portrait, person with expressive face, vibrant clothing, golden hour lighting", outputs=[prompt] ) vibrant_btn.click( lambda: "person in colorful streetwear, vibrant orange bucket hat, street photography, film aesthetic", outputs=[prompt] ) street_btn.click( lambda: "urban street style portrait, candid expression, natural lighting, contemporary photography", outputs=[prompt] ) generate_btn.click( fn=self.generate_image, inputs=[prompt, model_choice, lora_choice, steps, guidance, seed], outputs=[output_image, status] ) return interface def launch(self): """Launch complete interface""" interface = self.create_interface() port = find_free_port() print("🏠 Launching Complete Local Flux Studio...") print(f"📱 Interface: http://localhost:{port}") print("🚀 Using maximum local resources!") try: interface.launch( server_port=port, share=False, inbrowser=True ) except Exception as e: print(f"❌ Launch failed: {e}") if __name__ == "__main__": # Check if sentencepiece is installed try: import sentencepiece print("✅ SentencePiece found") except ImportError: print("❌ SentencePiece not found") print("🔧 Install with: pip install sentencepiece protobuf") exit(1) interface = CompleteLocalFlux() interface.launch()