Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -5,7 +5,7 @@ emoji: 馃敟
|
|
| 5 |
colorFrom: indigo
|
| 6 |
colorTo: indigo
|
| 7 |
sdk: gradio
|
| 8 |
-
sdk_version:
|
| 9 |
app_file: run.py
|
| 10 |
pinned: false
|
| 11 |
hf_oauth: true
|
|
|
|
| 5 |
colorFrom: indigo
|
| 6 |
colorTo: indigo
|
| 7 |
sdk: gradio
|
| 8 |
+
sdk_version: 6.0.0
|
| 9 |
app_file: run.py
|
| 10 |
pinned: false
|
| 11 |
hf_oauth: true
|
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
gradio-client @ git+https://github.com/gradio-app/gradio@
|
| 2 |
-
https://gradio-pypi-previews.s3.amazonaws.com/
|
|
|
|
| 1 |
+
gradio-client @ git+https://github.com/gradio-app/gradio@d007e6cf617baba5c62e49ec2b7ce278aa863a79#subdirectory=client/python
|
| 2 |
+
https://gradio-pypi-previews.s3.amazonaws.com/d007e6cf617baba5c62e49ec2b7ce278aa863a79/gradio-6.0.0-py3-none-any.whl
|
run.ipynb
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: blocks_joined"]}, {"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": ["from time import sleep\n", "import gradio as gr\n", "from gradio.media import get_image\n", "\n", "# get_image() returns file paths to sample media included with Gradio\n", "cheetah = get_image(\"cheetah1.jpg\")\n", "\n", "def img(text):\n", " sleep(3)\n", " return [\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " ]\n", "\n", "with gr.Blocks(
|
|
|
|
| 1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: blocks_joined"]}, {"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": ["from time import sleep\n", "import gradio as gr\n", "from gradio.media import get_image\n", "\n", "# get_image() returns file paths to sample media included with Gradio\n", "cheetah = get_image(\"cheetah1.jpg\")\n", "\n", "def img(text):\n", " sleep(3)\n", " return [\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " cheetah,\n", " ]\n", "\n", "with gr.Blocks() as demo:\n", " gr.Markdown(\"<h1><center>DALL\u00b7E mini</center></h1>\")\n", " gr.Markdown(\n", " \"DALL\u00b7E mini is an AI model that generates images from any prompt you give!\"\n", " )\n", " with gr.Group():\n", " with gr.Row(equal_height=True):\n", " text = gr.Textbox(\n", " label=\"Enter your prompt\",\n", " max_lines=1,\n", " container=False,\n", " )\n", " btn = gr.Button(\"Run\", scale=0)\n", " gallery = gr.Gallery(\n", " label=\"Generated images\",\n", " show_label=False,\n", " columns=1,\n", " height=\"auto\",\n", " )\n", " btn.click(img, inputs=text, outputs=gallery)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch(css=\".container { max-width: 800px; margin: auto; }\")\n", "\n", "# margin = (TOP, RIGHT, BOTTOM, LEFT)\n", "# rounded = (TOPLEFT, TOPRIGHT, BOTTOMRIGHT, BOTTOMLEFT)\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
|
@@ -19,7 +19,7 @@ def img(text):
|
|
| 19 |
cheetah,
|
| 20 |
]
|
| 21 |
|
| 22 |
-
with gr.Blocks(
|
| 23 |
gr.Markdown("<h1><center>DALL路E mini</center></h1>")
|
| 24 |
gr.Markdown(
|
| 25 |
"DALL路E mini is an AI model that generates images from any prompt you give!"
|
|
@@ -41,7 +41,7 @@ with gr.Blocks(css=".container { max-width: 800px; margin: auto; }") as demo:
|
|
| 41 |
btn.click(img, inputs=text, outputs=gallery)
|
| 42 |
|
| 43 |
if __name__ == "__main__":
|
| 44 |
-
demo.launch()
|
| 45 |
|
| 46 |
# margin = (TOP, RIGHT, BOTTOM, LEFT)
|
| 47 |
# rounded = (TOPLEFT, TOPRIGHT, BOTTOMRIGHT, BOTTOMLEFT)
|
|
|
|
| 19 |
cheetah,
|
| 20 |
]
|
| 21 |
|
| 22 |
+
with gr.Blocks() as demo:
|
| 23 |
gr.Markdown("<h1><center>DALL路E mini</center></h1>")
|
| 24 |
gr.Markdown(
|
| 25 |
"DALL路E mini is an AI model that generates images from any prompt you give!"
|
|
|
|
| 41 |
btn.click(img, inputs=text, outputs=gallery)
|
| 42 |
|
| 43 |
if __name__ == "__main__":
|
| 44 |
+
demo.launch(css=".container { max-width: 800px; margin: auto; }")
|
| 45 |
|
| 46 |
# margin = (TOP, RIGHT, BOTTOM, LEFT)
|
| 47 |
# rounded = (TOPLEFT, TOPRIGHT, BOTTOMRIGHT, BOTTOMLEFT)
|