aliabd HF staff commited on
Commit
0463a5a
1 Parent(s): dc00a39

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. requirements.txt +2 -2
  2. run.ipynb +1 -1
  3. run.py +0 -2
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@de997e67c9a7feb9e2eccebf92969366dbd67eba#subdirectory=client/python
2
- https://gradio-builds.s3.amazonaws.com/de997e67c9a7feb9e2eccebf92969366dbd67eba/gradio-4.39.0-py3-none-any.whl
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@9b42ba8f1006c05d60a62450d3036ce0d6784f86#subdirectory=client/python
2
+ https://gradio-builds.s3.amazonaws.com/9b42ba8f1006c05d60a62450d3036ce0d6784f86/gradio-4.39.0-py3-none-any.whl
run.ipynb CHANGED
@@ -1 +1 @@
1
- {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: image_mod_default_image"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "os.mkdir('images')\n", "!wget -q -O images/cheetah1.jpg https://github.com/gradio-app/gradio/raw/main/demo/image_mod_default_image/images/cheetah1.jpg\n", "!wget -q -O images/lion.jpg https://github.com/gradio-app/gradio/raw/main/demo/image_mod_default_image/images/lion.jpg\n", "!wget -q -O images/logo.png https://github.com/gradio-app/gradio/raw/main/demo/image_mod_default_image/images/logo.png"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import os\n", "\n", "\n", "def image_mod(image):\n", " return image.rotate(45)\n", "\n", "\n", "cheetah = os.path.join(os.path.abspath(''), \"images/cheetah1.jpg\")\n", "\n", "demo = gr.Interface(image_mod, gr.Image(type=\"pil\", value=cheetah), \"image\",\n", " flagging_options=[\"blurry\", \"incorrect\", \"other\"], examples=[\n", " os.path.join(os.path.abspath(''), \"images/lion.jpg\"),\n", " os.path.join(os.path.abspath(''), \"images/logo.png\")\n", " ])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch(max_file_size=\"70kb\")\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
1
+ {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: image_mod_default_image"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "os.mkdir('images')\n", "!wget -q -O images/cheetah1.jpg https://github.com/gradio-app/gradio/raw/main/demo/image_mod_default_image/images/cheetah1.jpg\n", "!wget -q -O images/lion.jpg https://github.com/gradio-app/gradio/raw/main/demo/image_mod_default_image/images/lion.jpg\n", "!wget -q -O images/logo.png https://github.com/gradio-app/gradio/raw/main/demo/image_mod_default_image/images/logo.png"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import os\n", "\n", "def image_mod(image):\n", " return image.rotate(45)\n", "\n", "cheetah = os.path.join(os.path.abspath(''), \"images/cheetah1.jpg\")\n", "\n", "demo = gr.Interface(image_mod, gr.Image(type=\"pil\", value=cheetah), \"image\",\n", " flagging_options=[\"blurry\", \"incorrect\", \"other\"], examples=[\n", " os.path.join(os.path.abspath(''), \"images/lion.jpg\"),\n", " os.path.join(os.path.abspath(''), \"images/logo.png\")\n", " ])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch(max_file_size=\"70kb\")\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -1,11 +1,9 @@
1
  import gradio as gr
2
  import os
3
 
4
-
5
  def image_mod(image):
6
  return image.rotate(45)
7
 
8
-
9
  cheetah = os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg")
10
 
11
  demo = gr.Interface(image_mod, gr.Image(type="pil", value=cheetah), "image",
 
1
  import gradio as gr
2
  import os
3
 
 
4
  def image_mod(image):
5
  return image.rotate(45)
6
 
 
7
  cheetah = os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg")
8
 
9
  demo = gr.Interface(image_mod, gr.Image(type="pil", value=cheetah), "image",