Spaces:
Running
Running
Commit
·
96d40c3
1
Parent(s):
7f3ddf7
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import cv2
|
3 |
+
import numpy as np
|
4 |
+
def tes(a):
|
5 |
+
loaded_image = a
|
6 |
+
loaded_image = cv2.cvtColor(loaded_image,cv2.COLOR_BGR2RGB)
|
7 |
+
gray_image = cv2.cvtColor(loaded_image,cv2.COLOR_BGR2GRAY)
|
8 |
+
edged_image = cv2.Canny(gray_image, threshold1=30, threshold2=100)
|
9 |
+
return edged_image
|
10 |
+
coba=gr.Interface(fn=tes,inputs=gr.Webcam(),outputs=gr.Image())
|
11 |
+
coba.launch(share=True)
|