Spaces:
Sleeping
Sleeping
kwabs22
commited on
Commit
·
b30187c
1
Parent(s):
205c250
1st commit
Browse files
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# https://huggingface.co/spaces/lampongyuen/Gradio-Webcam-Streaming/blob/main/app.py (I thought needed video instead of Image)
|
2 |
+
|
3 |
+
import gradio as gr
|
4 |
+
import numpy as np
|
5 |
+
import time
|
6 |
+
|
7 |
+
def flip(im):
|
8 |
+
return np.flipud(im)
|
9 |
+
|
10 |
+
def dummyaudioprocess(aud):
|
11 |
+
time.sleep(3)
|
12 |
+
|
13 |
+
with gr.Blocks() as realtimemedia:
|
14 |
+
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 " )
|
15 |
+
gr.Interface(flip, gr.Image(sources=["webcam"], streaming=True), "image", live=True)
|
16 |
+
gr.Interface(flip, gr.Audio(sources=["mixrophone"], streaming=True), "audio", live=True)
|
17 |
+
|
18 |
+
realtimemedia.launch()
|