# How to call two functions at the same time

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-call-two-functions-at-the-same-time%2F51339%3E%5C
**Category:** 🔒 Gradio\
**Created:** [August 19, 2023, 2:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-call-two-functions-at-the-same-time%2F51339 "2023-08-19T14:06:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gensim2](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gensim2](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fgensim2)%5C
**Post date:** [August 19, 2023, 2:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-call-two-functions-at-the-same-time%2F51339%2F1 "2023-08-19T14:06:38Z")

</div>

I have a function which can yield a picture every second. I will append the picture to the end a list.

I want to repeatedly render all the picture in the list as a video (but every time the video is played, total frames will grow with time). So I design another function in a infinite loop to yield the picture of the list to a gradio Picture at 30Hz. But how to call them both at a time??  
Can anyone help me? Thanks very much!

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fabidlabs)%5C
**Post date:** [August 21, 2023, 1:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-call-two-functions-at-the-same-time%2F51339%2F2 "2023-08-21T13:27:12Z")

</div>

Hi @gensim2 sorry I don’t understand the question… can you elaborate a bit more and provide a code example?
