{ "cells": [ { "cell_type": "code", "execution_count": 3, "id": "2bfed007-9fb0-4ba9-9651-358b134d8e38", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Running on local URL: http://127.0.0.1:7860\n", "\n", "To create a public link, set `share=True` in `launch()`.\n" ] }, { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import gradio as gr\n", "\n", "def check_image(input_img):\n", " out_image = input_img\n", " return out_image\n", "\n", "demo = gr.Interface(\n", " fn=check_image,\n", " inputs=gr.Image(shape=(200,200)),\n", " outputs=\"image\")\n", "\n", "demo.launch()" ] }, { "cell_type": "code", "execution_count": null, "id": "5b880101-701a-4727-ab98-7fd3af15211d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }