Timing-up commited on
Commit
203ac88
·
verified ·
1 Parent(s): b8e604b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -1,13 +1,7 @@
1
- import numpy as np
2
- import gradio as gr
3
- import cv2
4
-
5
- def gray(input_img):
6
- grayImage = cv2.cvtColor(input_img, cv2.COLOR_BGR2GRAY)
7
- return grayImage
8
-
9
- input = gr.Image(height=300, width=300, label="Upload Image") #label 代表输入框的标题
10
- output = gr.Image()
11
-
12
- demo = gr.Interface(fn=gray, inputs=input, outputs = output)
13
- demo.launch(share=True)
 
1
+ import gradio as gr
2
+
3
+ def greet(name):
4
+ return "Hello " + name + "!!"
5
+
6
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+ iface.launch()