Spaces:
Running
Running
Commit
·
aa4ff87
1
Parent(s):
3700a6a
Used gr.live for camera
Browse files
app.py
CHANGED
@@ -206,13 +206,13 @@ def create_app():
|
|
206 |
last_process_time = time.time() - 10
|
207 |
processing_interval = 5
|
208 |
|
209 |
-
with gr.Blocks(theme=gr.themes.
|
210 |
-
gr.Markdown("#
|
211 |
gr.Markdown("### Camera captures what you're doing and your Asian mom responds appropriately")
|
212 |
|
213 |
with gr.Row():
|
214 |
with gr.Column():
|
215 |
-
video_feed = gr.
|
216 |
|
217 |
with gr.Column():
|
218 |
analysis_output = gr.Textbox(label="What AsianMOM Sees", lines=2)
|
@@ -248,7 +248,7 @@ def create_app():
|
|
248 |
return image, default_caption, default_roast, default_audio
|
249 |
|
250 |
# Setup the processing chain
|
251 |
-
video_feed.
|
252 |
process_webcam,
|
253 |
inputs=[video_feed],
|
254 |
outputs=[video_feed, analysis_output, roast_output, audio_output]
|
|
|
206 |
last_process_time = time.time() - 10
|
207 |
processing_interval = 5
|
208 |
|
209 |
+
with gr.Blocks(theme=gr.themes.Monochrome()) as app:
|
210 |
+
gr.Markdown("# Artificial Surveillance with Interactive Analysis with a Nagging Maternal Oversight Model")
|
211 |
gr.Markdown("### Camera captures what you're doing and your Asian mom responds appropriately")
|
212 |
|
213 |
with gr.Row():
|
214 |
with gr.Column():
|
215 |
+
video_feed = gr.Live(label="Camera Feed")
|
216 |
|
217 |
with gr.Column():
|
218 |
analysis_output = gr.Textbox(label="What AsianMOM Sees", lines=2)
|
|
|
248 |
return image, default_caption, default_roast, default_audio
|
249 |
|
250 |
# Setup the processing chain
|
251 |
+
video_feed.stream(
|
252 |
process_webcam,
|
253 |
inputs=[video_feed],
|
254 |
outputs=[video_feed, analysis_output, roast_output, audio_output]
|