Create run.ipynb
Browse files
run.ipynb
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "markdown",
|
| 5 |
+
"id": 3.0293430767166755e+38,
|
| 6 |
+
"metadata": {
|
| 7 |
+
"id": 3.0293430767166755e+38
|
| 8 |
+
},
|
| 9 |
+
"source": [
|
| 10 |
+
"# Gradio Demo: Hola Antonio"
|
| 11 |
+
]
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"cell_type": "code",
|
| 15 |
+
"execution_count": 7,
|
| 16 |
+
"id": 2.7299665331067346e+38,
|
| 17 |
+
"metadata": {
|
| 18 |
+
"id": 2.7299665331067346e+38
|
| 19 |
+
},
|
| 20 |
+
"outputs": [],
|
| 21 |
+
"source": [
|
| 22 |
+
"!pip install -q gradio"
|
| 23 |
+
]
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"cell_type": "code",
|
| 27 |
+
"source": [
|
| 28 |
+
"import gradio as gr\n",
|
| 29 |
+
"\n",
|
| 30 |
+
"def greet(name):\n",
|
| 31 |
+
" return \"Hello \" + name + \"!!\"\n",
|
| 32 |
+
"\n",
|
| 33 |
+
"iface = gr.Interface(fn=greet, inputs=\"text\", outputs=\"text\")\n",
|
| 34 |
+
"iface.launch()"
|
| 35 |
+
],
|
| 36 |
+
"metadata": {
|
| 37 |
+
"id": "BxVmdCduH2iv",
|
| 38 |
+
"outputId": "00f879f9-5a7f-4679-ced4-684ef0440ece",
|
| 39 |
+
"colab": {
|
| 40 |
+
"base_uri": "https://localhost:8080/",
|
| 41 |
+
"height": 626
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"id": "BxVmdCduH2iv",
|
| 45 |
+
"execution_count": 8,
|
| 46 |
+
"outputs": [
|
| 47 |
+
{
|
| 48 |
+
"output_type": "stream",
|
| 49 |
+
"name": "stdout",
|
| 50 |
+
"text": [
|
| 51 |
+
"Setting queue=True in a Colab notebook requires sharing enabled. Setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n",
|
| 52 |
+
"\n",
|
| 53 |
+
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
|
| 54 |
+
"Running on public URL: https://c47bcfc9c499c9e471.gradio.live\n",
|
| 55 |
+
"\n",
|
| 56 |
+
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
| 57 |
+
]
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"output_type": "display_data",
|
| 61 |
+
"data": {
|
| 62 |
+
"text/plain": [
|
| 63 |
+
"<IPython.core.display.HTML object>"
|
| 64 |
+
],
|
| 65 |
+
"text/html": [
|
| 66 |
+
"<div><iframe src=\"https://c47bcfc9c499c9e471.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
| 67 |
+
]
|
| 68 |
+
},
|
| 69 |
+
"metadata": {}
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"output_type": "execute_result",
|
| 73 |
+
"data": {
|
| 74 |
+
"text/plain": []
|
| 75 |
+
},
|
| 76 |
+
"metadata": {},
|
| 77 |
+
"execution_count": 8
|
| 78 |
+
}
|
| 79 |
+
]
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"metadata": {
|
| 83 |
+
"colab": {
|
| 84 |
+
"provenance": []
|
| 85 |
+
},
|
| 86 |
+
"language_info": {
|
| 87 |
+
"name": "python"
|
| 88 |
+
},
|
| 89 |
+
"kernelspec": {
|
| 90 |
+
"name": "python3",
|
| 91 |
+
"display_name": "Python 3"
|
| 92 |
+
}
|
| 93 |
+
},
|
| 94 |
+
"nbformat": 4,
|
| 95 |
+
"nbformat_minor": 5
|
| 96 |
+
}
|