# Can we set blocks with live (like interface)?

**URL:** <https://discuss.huggingface.co/t/can-we-set-blocks-with-live-like-interface/37329>\
**Category:** 🔒 Gradio\
**Created:** [April 21, 2023, 9:56am UTC](https://discuss.huggingface.co/t/can-we-set-blocks-with-live-like-interface/37329 "2023-04-21T09:56:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [April 21, 2023, 9:13pm UTC](https://discuss.huggingface.co/t/can-we-set-blocks-with-live-like-interface/37329/2 "2023-04-21T21:13:15Z")

</div>

hi @laro1  
here is an example using a Camera, but you can replace with the Audio

```python

import gradio as gr
import numpy as np

def flip(im):
    return np.flipud(im)

with gr.Blocks() as demo:
  with gr.Row():
      with gr.Column():
        camera = gr.Image(source="webcam")
      with gr.Column():
        image = gr.Image()
  camera.stream(fn=flip, inputs=[camera], outputs=[image])

demo.launch()

```

---

_[View the full topic](https://discuss.huggingface.co/t/can-we-set-blocks-with-live-like-interface/37329)._
