Update run.ipynb
Browse files
run.ipynb
CHANGED
|
@@ -12,12 +12,37 @@
|
|
| 12 |
},
|
| 13 |
{
|
| 14 |
"cell_type": "code",
|
| 15 |
-
"execution_count":
|
| 16 |
"id": 2.7299665331067346e+38,
|
| 17 |
"metadata": {
|
| 18 |
-
"id": 2.7299665331067346e+38
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
},
|
| 20 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
"source": [
|
| 22 |
"!pip install -q gradio"
|
| 23 |
]
|
|
@@ -30,19 +55,30 @@
|
|
| 30 |
"def greet(name):\n",
|
| 31 |
" return \"Hello \" + name + \"!!\"\n",
|
| 32 |
"\n",
|
| 33 |
-
"iface = gr.Interface(fn=greet, inputs=\"text\", outputs=\"text\"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
"iface.launch()"
|
| 35 |
],
|
| 36 |
"metadata": {
|
| 37 |
"id": "BxVmdCduH2iv",
|
| 38 |
-
"outputId": "
|
| 39 |
"colab": {
|
| 40 |
"base_uri": "https://localhost:8080/",
|
| 41 |
"height": 626
|
| 42 |
}
|
| 43 |
},
|
| 44 |
"id": "BxVmdCduH2iv",
|
| 45 |
-
"execution_count":
|
| 46 |
"outputs": [
|
| 47 |
{
|
| 48 |
"output_type": "stream",
|
|
@@ -51,7 +87,7 @@
|
|
| 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://
|
| 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 |
]
|
|
@@ -63,7 +99,7 @@
|
|
| 63 |
"<IPython.core.display.HTML object>"
|
| 64 |
],
|
| 65 |
"text/html": [
|
| 66 |
-
"<div><iframe src=\"https://
|
| 67 |
]
|
| 68 |
},
|
| 69 |
"metadata": {}
|
|
@@ -74,7 +110,7 @@
|
|
| 74 |
"text/plain": []
|
| 75 |
},
|
| 76 |
"metadata": {},
|
| 77 |
-
"execution_count":
|
| 78 |
}
|
| 79 |
]
|
| 80 |
}
|
|
|
|
| 12 |
},
|
| 13 |
{
|
| 14 |
"cell_type": "code",
|
| 15 |
+
"execution_count": 1,
|
| 16 |
"id": 2.7299665331067346e+38,
|
| 17 |
"metadata": {
|
| 18 |
+
"id": 2.7299665331067346e+38,
|
| 19 |
+
"outputId": "dbc6fb4c-e5fc-4543-eb6b-9d55904fe999",
|
| 20 |
+
"colab": {
|
| 21 |
+
"base_uri": "https://localhost:8080/"
|
| 22 |
+
}
|
| 23 |
},
|
| 24 |
+
"outputs": [
|
| 25 |
+
{
|
| 26 |
+
"output_type": "stream",
|
| 27 |
+
"name": "stdout",
|
| 28 |
+
"text": [
|
| 29 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.3/20.3 MB\u001b[0m \u001b[31m62.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 30 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.3/66.3 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 31 |
+
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
| 32 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m298.8/298.8 kB\u001b[0m \u001b[31m37.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 33 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.7/75.7 kB\u001b[0m \u001b[31m10.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 34 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m295.0/295.0 kB\u001b[0m \u001b[31m36.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 35 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.7/138.7 kB\u001b[0m \u001b[31m15.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 36 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 37 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.5/59.5 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 38 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m10.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 39 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 40 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m9.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 41 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.0/76.0 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 42 |
+
"\u001b[?25h Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n"
|
| 43 |
+
]
|
| 44 |
+
}
|
| 45 |
+
],
|
| 46 |
"source": [
|
| 47 |
"!pip install -q gradio"
|
| 48 |
]
|
|
|
|
| 55 |
"def greet(name):\n",
|
| 56 |
" return \"Hello \" + name + \"!!\"\n",
|
| 57 |
"\n",
|
| 58 |
+
"iface = gr.Interface(fn=greet, inputs=\"text\", outputs=\"text\",\n",
|
| 59 |
+
" examples=[\n",
|
| 60 |
+
" [\"Hello \" + \"!!\"],\n",
|
| 61 |
+
" [ \"Hello Antonio!!\"],\n",
|
| 62 |
+
" [ \"Hello Pedro!!\"],\n",
|
| 63 |
+
" [ \"Hello 568Ant!!\"],\n",
|
| 64 |
+
" ],\n",
|
| 65 |
+
" title=\"Hola básico\",\n",
|
| 66 |
+
" description=\"Aquí hay un saludo básico.\",\n",
|
| 67 |
+
" article= \"Antonio Fernandez Salcedo, Practicas Saturdays.AI\",\n",
|
| 68 |
+
")\n",
|
| 69 |
+
"\n",
|
| 70 |
"iface.launch()"
|
| 71 |
],
|
| 72 |
"metadata": {
|
| 73 |
"id": "BxVmdCduH2iv",
|
| 74 |
+
"outputId": "41c40c5c-fd49-42d9-c710-7b6c3083f8ea",
|
| 75 |
"colab": {
|
| 76 |
"base_uri": "https://localhost:8080/",
|
| 77 |
"height": 626
|
| 78 |
}
|
| 79 |
},
|
| 80 |
"id": "BxVmdCduH2iv",
|
| 81 |
+
"execution_count": 2,
|
| 82 |
"outputs": [
|
| 83 |
{
|
| 84 |
"output_type": "stream",
|
|
|
|
| 87 |
"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",
|
| 88 |
"\n",
|
| 89 |
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
|
| 90 |
+
"Running on public URL: https://aa93137ba5b92ad364.gradio.live\n",
|
| 91 |
"\n",
|
| 92 |
"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"
|
| 93 |
]
|
|
|
|
| 99 |
"<IPython.core.display.HTML object>"
|
| 100 |
],
|
| 101 |
"text/html": [
|
| 102 |
+
"<div><iframe src=\"https://aa93137ba5b92ad364.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
| 103 |
]
|
| 104 |
},
|
| 105 |
"metadata": {}
|
|
|
|
| 110 |
"text/plain": []
|
| 111 |
},
|
| 112 |
"metadata": {},
|
| 113 |
+
"execution_count": 2
|
| 114 |
}
|
| 115 |
]
|
| 116 |
}
|