abidlabs HF Staff commited on
Commit
9f01794
·
verified ·
1 Parent(s): 0093dd2

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +3 -9
  2. run.ipynb +1 -0
  3. run.py +14 -0
  4. screenshot.png +0 -0
README.md CHANGED
@@ -1,12 +1,6 @@
1
  ---
2
- title: Uptest
3
- emoji: 🚀
4
- colorFrom: gray
5
- colorTo: red
6
  sdk: gradio
7
- sdk_version: 5.1.0
8
- app_file: app.py
9
- pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: uptest
3
+ app_file: run.py
 
 
4
  sdk: gradio
5
+ sdk_version: 5.2.1
 
 
6
  ---
 
 
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", "def snap(image, video):\n", " return [image, video]\n", "\n", "demo = gr.Interface(\n", " snap,\n", " [gr.Image(sources=[\"webcam\"]), gr.Video(sources=[\"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,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+
4
+ def snap(image, video):
5
+ return [image, video]
6
+
7
+ demo = gr.Interface(
8
+ snap,
9
+ [gr.Image(sources=["webcam"]), gr.Video(sources=["webcam"])],
10
+ ["image", "video"],
11
+ )
12
+
13
+ if __name__ == "__main__":
14
+ demo.launch()
screenshot.png ADDED