jeffreymjohnson commited on
Commit
8cc93ef
·
1 Parent(s): 6b5c164
Files changed (1) hide show
  1. Untitled.ipynb +91 -0
Untitled.ipynb ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 3,
6
+ "id": "2bfed007-9fb0-4ba9-9651-358b134d8e38",
7
+ "metadata": {},
8
+ "outputs": [
9
+ {
10
+ "name": "stdout",
11
+ "output_type": "stream",
12
+ "text": [
13
+ "Running on local URL: http://127.0.0.1:7860\n",
14
+ "\n",
15
+ "To create a public link, set `share=True` in `launch()`.\n"
16
+ ]
17
+ },
18
+ {
19
+ "data": {
20
+ "text/html": [
21
+ "<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
22
+ ],
23
+ "text/plain": [
24
+ "<IPython.core.display.HTML object>"
25
+ ]
26
+ },
27
+ "metadata": {},
28
+ "output_type": "display_data"
29
+ },
30
+ {
31
+ "data": {
32
+ "text/plain": []
33
+ },
34
+ "execution_count": 3,
35
+ "metadata": {},
36
+ "output_type": "execute_result"
37
+ }
38
+ ],
39
+ "source": [
40
+ "import gradio as gr\n",
41
+ "\n",
42
+ "def check_image(input_img):\n",
43
+ " out_image = input_img\n",
44
+ " return out_image\n",
45
+ "\n",
46
+ "demo = gr.Interface(\n",
47
+ " fn=check_image,\n",
48
+ " inputs=gr.Image(shape=(200,200)),\n",
49
+ " outputs=\"image\")\n",
50
+ "\n",
51
+ "demo.launch()"
52
+ ]
53
+ },
54
+ {
55
+ "cell_type": "code",
56
+ "execution_count": null,
57
+ "id": "5b880101-701a-4727-ab98-7fd3af15211d",
58
+ "metadata": {},
59
+ "outputs": [],
60
+ "source": []
61
+ }
62
+ ],
63
+ "metadata": {
64
+ "kernelspec": {
65
+ "display_name": "Python 3 (ipykernel)",
66
+ "language": "python",
67
+ "name": "python3"
68
+ },
69
+ "language_info": {
70
+ "codemirror_mode": {
71
+ "name": "ipython",
72
+ "version": 3
73
+ },
74
+ "file_extension": ".py",
75
+ "mimetype": "text/x-python",
76
+ "name": "python",
77
+ "nbconvert_exporter": "python",
78
+ "pygments_lexer": "ipython3",
79
+ "version": "3.9.16"
80
+ },
81
+ "widgets": {
82
+ "application/vnd.jupyter.widget-state+json": {
83
+ "state": {},
84
+ "version_major": 2,
85
+ "version_minor": 0
86
+ }
87
+ }
88
+ },
89
+ "nbformat": 4,
90
+ "nbformat_minor": 5
91
+ }