mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
ef3862e075
* Sort requirements.in * Switch flake8 + isort to ruff * Apply ruff import order fixes * Fix ruff complaints in demo/ * Fix ruff complaints in test/ * Use `x is not y`, not `not x is y` * Remove unused listdir from website generator * Clean up duplicate dict keys * Add changelog entry * Clean up unused imports (except in gradio/__init__.py) * add space --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
17 lines
249 B
Python
17 lines
249 B
Python
|
|
import gradio as gr
|
|
|
|
|
|
def snap(image, video):
|
|
return [image, video]
|
|
|
|
|
|
demo = gr.Interface(
|
|
snap,
|
|
[gr.Image(source="webcam", tool=None), gr.Video(source="webcam")],
|
|
["image", "video"],
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|