Spaces:
Running
Running
Download components/MultimodalInput/demos/upload_sources.py from modelscope/modelscope-studio: direct link, hf CLI and curl.
- Browser
- Download file 302 Bytes
-
https://huggingface.co/spaces/modelscope/modelscope-studio/resolve/refs%2Fpr%2F1/components/MultimodalInput/demos/upload_sources.py
- Command line
-
hf download hf://spaces/modelscope/modelscope-studio@refs/pr/1/components/MultimodalInput/demos/upload_sources.py
-
curl -L -o upload_sources.py https://huggingface.co/spaces/modelscope/modelscope-studio/resolve/refs%2Fpr%2F1/components/MultimodalInput/demos/upload_sources.py
302 Bytes
| import gradio as gr | |
| import modelscope_studio as mgr | |
| def fn(value): | |
| print(value.text, value.files) | |
| with gr.Blocks() as demo: | |
| input = mgr.MultimodalInput(sources=["upload", "microphone", "webcam"]) | |
| input.change(fn=fn, inputs=[input]) | |
| if __name__ == "__main__": | |
| demo.queue().launch() | |