Upload folder using huggingface_hub
Browse files- README.md +6 -8
- requirements.txt +1 -0
- run.ipynb +1 -0
- run.py +16 -0
- screenshot.png +0 -0
README.md
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
|
|
|
4 |
colorFrom: red
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
-
|
8 |
-
|
9 |
-
pinned: false
|
10 |
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: webcam
|
3 |
+
app_file: run.py
|
4 |
+
emoji: 🎁
|
5 |
colorFrom: red
|
6 |
+
colorTo: red
|
7 |
sdk: gradio
|
8 |
+
python_version: 3.9.5
|
9 |
+
sdk_version: 3.32.0
|
|
|
10 |
---
|
|
|
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
transformers
|
run.ipynb
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: webcam"]}, {"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": ["\n", "import gradio as gr\n", "\n", "\n", "def snap(image, video):\n", " return [image, video]\n", "\n", "\n", "demo = gr.Interface(\n", " snap,\n", " [gr.Image(source=\"webcam\", tool=None), gr.Video(source=\"webcam\")],\n", " [\"image\", \"video\"],\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
|
5 |
+
def snap(image, video):
|
6 |
+
return [image, video]
|
7 |
+
|
8 |
+
|
9 |
+
demo = gr.Interface(
|
10 |
+
snap,
|
11 |
+
[gr.Image(source="webcam", tool=None), gr.Video(source="webcam")],
|
12 |
+
["image", "video"],
|
13 |
+
)
|
14 |
+
|
15 |
+
if __name__ == "__main__":
|
16 |
+
demo.launch()
|
screenshot.png
ADDED
![]() |