.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/07_claude/claude_03_hybrid_gallery.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_07_claude_claude_03_hybrid_gallery.py: You and Claude together in a notebook gallery ============================================= In Jupyter or Colab the :class:`~easyiec.ui.JupyterGallery` shows the images with buttons. With an escalation evaluator Claude answers the easy queries; when it is unsure the gallery stops, shows Claude's suggestion pre-selected, and waits for your clicks. *Ask AI* fills in Claude's answer on demand; the comment box accepts phrases such as "much brighter, slightly less contrast". .. GENERATED FROM PYTHON SOURCE LINES 11-23 .. code-block:: Python import easyiec as ei from easyiec.evaluators import AnthropicClient, EscalationEvaluator, HumanProxy, LLMJudge from easyiec.problems import ImageEnhancement from easyiec.strategies import InteractiveGA problem = ImageEnhancement() judge = LLMJudge(AnthropicClient("claude-haiku-5-5"), problem, goal="a natural, warm, well-exposed photo of a cup of coffee") hybrid = EscalationEvaluator(judge, HumanProxy(), policy="rate", target_rate=0.3) app = ei.ui.JupyterGallery(problem, InteractiveGA(pop_size=9), evaluator=hybrid, assistant=judge) app # the last expression of a cell displays the gallery .. _sphx_glr_download_auto_examples_07_claude_claude_03_hybrid_gallery.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/ComplexSystemsIntelligence/easyiec/main?urlpath=lab/tree/notebooks/auto_examples/07_claude/claude_03_hybrid_gallery.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: claude_03_hybrid_gallery.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: claude_03_hybrid_gallery.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: claude_03_hybrid_gallery.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_