Spaces:
Runtime error
Runtime error
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: 5.
|
| 9 |
app_file: run.py
|
| 10 |
pinned: false
|
| 11 |
hf_oauth: true
|
|
|
|
| 5 |
colorFrom: indigo
|
| 6 |
colorTo: indigo
|
| 7 |
sdk: gradio
|
| 8 |
+
sdk_version: 5.48.0
|
| 9 |
app_file: run.py
|
| 10 |
pinned: false
|
| 11 |
hf_oauth: true
|
run.ipynb
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: video_component"]}, {"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": ["
|
|
|
|
| 1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: video_component"]}, {"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", "# get_video() returns the file path to sample videos included with Gradio\n", "from gradio.media import get_video\n", "\n", "demo = gr.Interface(\n", " fn=lambda x: x,\n", " inputs=gr.Video(),\n", " outputs=gr.Video(),\n", " examples=[\n", " [get_video(\"world.mp4\")],\n", " [get_video(\"a.mp4\")],\n", " [get_video(\"b.mp4\")],\n", " ],\n", " cache_examples=True\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
|
@@ -1,18 +1,15 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
a = os.path.join(os.path.dirname(__file__), "files/world.mp4") # Video
|
| 5 |
-
b = os.path.join(os.path.dirname(__file__), "files/a.mp4") # Video
|
| 6 |
-
c = os.path.join(os.path.dirname(__file__), "files/b.mp4") # Video
|
| 7 |
|
| 8 |
demo = gr.Interface(
|
| 9 |
fn=lambda x: x,
|
| 10 |
inputs=gr.Video(),
|
| 11 |
outputs=gr.Video(),
|
| 12 |
examples=[
|
| 13 |
-
[
|
| 14 |
-
[
|
| 15 |
-
[
|
| 16 |
],
|
| 17 |
cache_examples=True
|
| 18 |
)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
# get_video() returns the file path to sample videos included with Gradio
|
| 3 |
+
from gradio.media import get_video
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
demo = gr.Interface(
|
| 6 |
fn=lambda x: x,
|
| 7 |
inputs=gr.Video(),
|
| 8 |
outputs=gr.Video(),
|
| 9 |
examples=[
|
| 10 |
+
[get_video("world.mp4")],
|
| 11 |
+
[get_video("a.mp4")],
|
| 12 |
+
[get_video("b.mp4")],
|
| 13 |
],
|
| 14 |
cache_examples=True
|
| 15 |
)
|