Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
run.ipynb
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: input_output"]}, {"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": ["import gradio as gr\n", "\n", "
|
|
|
|
| 1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: input_output"]}, {"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": ["import gradio as gr\n", "\n", "def image_mod(text):\n", " return text[::-1]\n", "\n", "demo = gr.Blocks()\n", "\n", "with demo:\n", " text = gr.Textbox(label=\"Input-Output\")\n", " btn = gr.Button(\"Run\")\n", " btn.click(image_mod, text, text)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
def image_mod(text):
|
| 5 |
return text[::-1]
|
| 6 |
|
| 7 |
-
|
| 8 |
demo = gr.Blocks()
|
| 9 |
|
| 10 |
with demo:
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
| 3 |
def image_mod(text):
|
| 4 |
return text[::-1]
|
| 5 |
|
|
|
|
| 6 |
demo = gr.Blocks()
|
| 7 |
|
| 8 |
with demo:
|