Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import gradio as gr
|
| 3 |
+
import cv2
|
| 4 |
+
|
| 5 |
+
def to_black(image):
|
| 6 |
+
output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
| 7 |
+
return output
|
| 8 |
+
|
| 9 |
+
interface = gr.Interface(fn=to_black, inputs="image", outputs="image")
|
| 10 |
+
interface.launch()
|