Upload google_colabs/Video_Subtitle_Remover_Gradio.ipynb with huggingface_hub
Browse files
google_colabs/Video_Subtitle_Remover_Gradio.ipynb
CHANGED
|
@@ -23,6 +23,11 @@
|
|
| 23 |
"- ~10-20GB storage (for models)"
|
| 24 |
]
|
| 25 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
{
|
| 27 |
"cell_type": "markdown",
|
| 28 |
"metadata": {},
|
|
@@ -72,9 +77,10 @@
|
|
| 72 |
"cell_type": "markdown",
|
| 73 |
"metadata": {},
|
| 74 |
"source": [
|
| 75 |
-
"
|
| 76 |
-
"\n",
|
| 77 |
-
"
|
|
|
|
| 78 |
]
|
| 79 |
},
|
| 80 |
{
|
|
@@ -92,7 +98,20 @@
|
|
| 92 |
"cell_type": "markdown",
|
| 93 |
"metadata": {},
|
| 94 |
"source": [
|
| 95 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
]
|
| 97 |
},
|
| 98 |
{
|
|
@@ -122,11 +141,16 @@
|
|
| 122 |
"cell_type": "markdown",
|
| 123 |
"metadata": {},
|
| 124 |
"source": [
|
| 125 |
-
"
|
|
|
|
|
|
|
|
|
|
| 126 |
"\n",
|
| 127 |
-
"
|
|
|
|
| 128 |
"\n",
|
| 129 |
-
"
|
|
|
|
| 130 |
]
|
| 131 |
},
|
| 132 |
{
|
|
@@ -233,13 +257,9 @@
|
|
| 233 |
"provenance": []
|
| 234 |
},
|
| 235 |
"kernelspec": {
|
| 236 |
-
"display_name": "Python 3",
|
| 237 |
"language": "python",
|
| 238 |
"name": "python3"
|
| 239 |
-
},
|
| 240 |
-
"language_info": {
|
| 241 |
-
"name": "python",
|
| 242 |
-
"version": "3.10.12"
|
| 243 |
}
|
| 244 |
},
|
| 245 |
"nbformat": 4,
|
|
|
|
| 23 |
"- ~10-20GB storage (for models)"
|
| 24 |
]
|
| 25 |
},
|
| 26 |
+
{
|
| 27 |
+
"cell_type": "markdown",
|
| 28 |
+
"metadata": {},
|
| 29 |
+
"source": []
|
| 30 |
+
},
|
| 31 |
{
|
| 32 |
"cell_type": "markdown",
|
| 33 |
"metadata": {},
|
|
|
|
| 77 |
"cell_type": "markdown",
|
| 78 |
"metadata": {},
|
| 79 |
"source": [
|
| 80 |
+
"# Create google_colabs directory and download custom gradio_app.py\n",
|
| 81 |
+
"!mkdir -p google_colabs\n",
|
| 82 |
+
"!wget -q https://gist.githubusercontent.com/walidurrosyad/9c838a9f1a40c4f0b77cf885a59aff31/raw/gradio_app.py -O google_colabs/gradio_app.py\n",
|
| 83 |
+
"print(\"\u2713 Custom Gradio app downloaded!\")"
|
| 84 |
]
|
| 85 |
},
|
| 86 |
{
|
|
|
|
| 98 |
"cell_type": "markdown",
|
| 99 |
"metadata": {},
|
| 100 |
"source": [
|
| 101 |
+
"# Launch Gradio interface\n",
|
| 102 |
+
"import sys\n",
|
| 103 |
+
"import os\n",
|
| 104 |
+
"\n",
|
| 105 |
+
"# Add paths\n",
|
| 106 |
+
"sys.path.insert(0, '/content/video-subtitle-remover')\n",
|
| 107 |
+
"sys.path.insert(0, '/content/video-subtitle-remover/backend')\n",
|
| 108 |
+
"sys.path.insert(0, '/content/video-subtitle-remover/google_colabs')\n",
|
| 109 |
+
"\n",
|
| 110 |
+
"# Import gradio_app\n",
|
| 111 |
+
"from gradio_app import create_interface\n",
|
| 112 |
+
"\n",
|
| 113 |
+
"demo = create_interface()\n",
|
| 114 |
+
"demo.launch(share=True, debug=True)"
|
| 115 |
]
|
| 116 |
},
|
| 117 |
{
|
|
|
|
| 141 |
"cell_type": "markdown",
|
| 142 |
"metadata": {},
|
| 143 |
"source": [
|
| 144 |
+
"import sys\n",
|
| 145 |
+
"sys.path.insert(0, '/content/video-subtitle-remover')\n",
|
| 146 |
+
"sys.path.insert(0, '/content/video-subtitle-remover/backend')\n",
|
| 147 |
+
"sys.path.insert(0, '/content/video-subtitle-remover/google_colabs')\n",
|
| 148 |
"\n",
|
| 149 |
+
"# Import and run\n",
|
| 150 |
+
"from gradio_app import create_interface\n",
|
| 151 |
"\n",
|
| 152 |
+
"demo = create_interface()\n",
|
| 153 |
+
"demo.launch(share=True, debug=True)"
|
| 154 |
]
|
| 155 |
},
|
| 156 |
{
|
|
|
|
| 257 |
"provenance": []
|
| 258 |
},
|
| 259 |
"kernelspec": {
|
| 260 |
+
"display_name": "Python 3 (ipykernel)",
|
| 261 |
"language": "python",
|
| 262 |
"name": "python3"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
}
|
| 264 |
},
|
| 265 |
"nbformat": 4,
|