Spaces:
Paused
Paused
Raumkommander commited on
Commit ·
2ec7210
1
Parent(s): 2d6fc22
inital deployment1
Browse files
app.py
CHANGED
|
@@ -45,16 +45,22 @@ def video_stream(filter_type, prompt):
|
|
| 45 |
yield frame # Return processed frame
|
| 46 |
cap.release()
|
| 47 |
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
| 49 |
iface = gr.Interface(
|
| 50 |
fn=video_stream,
|
| 51 |
inputs=[
|
|
|
|
| 52 |
gr.Radio(["None", "Red", "Green", "Blue"], label="Color Filter"),
|
| 53 |
-
gr.Textbox(label="Stable Diffusion Prompt", value="A futuristic landscape")
|
| 54 |
],
|
| 55 |
outputs=gr.Image(label="AI-Enhanced Webcam Feed"),
|
| 56 |
-
live=True
|
| 57 |
)
|
| 58 |
|
|
|
|
|
|
|
| 59 |
if __name__ == "__main__":
|
| 60 |
iface.launch(share=True)
|
|
|
|
| 45 |
yield frame # Return processed frame
|
| 46 |
cap.release()
|
| 47 |
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
iface = gr.Interface(
|
| 53 |
fn=video_stream,
|
| 54 |
inputs=[
|
| 55 |
+
gr.Video(source="webcam", streaming=True), # Capture local webcam
|
| 56 |
gr.Radio(["None", "Red", "Green", "Blue"], label="Color Filter"),
|
| 57 |
+
gr.Textbox(label="Stable Diffusion Prompt", value="A futuristic landscape"),
|
| 58 |
],
|
| 59 |
outputs=gr.Image(label="AI-Enhanced Webcam Feed"),
|
| 60 |
+
live=True,
|
| 61 |
)
|
| 62 |
|
| 63 |
+
|
| 64 |
+
|
| 65 |
if __name__ == "__main__":
|
| 66 |
iface.launch(share=True)
|