kwabs22
queue?
5dd1ae9
raw
history blame contribute delete
No virus
917 Bytes
# https://huggingface.co/spaces/lampongyuen/Gradio-Webcam-Streaming/blob/main/app.py (I thought needed video instead of Image)
import gradio as gr
import numpy as np
import time
def flip(im):
return np.flipud(im)
def dummyaudioprocess(aud):
time.sleep(3)
return aud
with gr.Blocks() as realtimemedia:
gr.HTML("Dual Audio and Image and processing test - With inspiration from - https://huggingface.co/spaces/lampongyuen/Gradio-Webcam-Streaming/blob/main/app.py (I thought needed video instead of Image) <br> End goal is SAM on live webcam + audio live with whisper <br> Live interface seems not to work in colab so dont debug there (doesnt work for me here, why?)" )
gr.Interface(flip, gr.Image(sources=["webcam"], streaming=True), "image", live=True)
gr.Interface(dummyaudioprocess, gr.Audio(sources=["microphone"], streaming=True), "audio") #, live=True)
realtimemedia.queue().launch()