lampongyuen commited on
Commit
a4409f2
·
1 Parent(s): 15364a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -2,20 +2,22 @@ import gradio
2
  import cv2
3
 
4
 
5
- def inference(img):
6
  new_img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
 
 
7
  return new_img
8
- # blur = cv2.blur(img,(5,5))
9
 
10
  # For information on Interfaces, head to https://gradio.app/docs/
11
  # For user guides, head to https://gradio.app/guides/
12
  # For Spaces usage, head to https://huggingface.co/docs/hub/spaces
13
  iface = gradio.Interface(
14
  fn=inference,
15
- inputs='image',
16
  outputs='image',
17
  title='Change Image',
18
  description='Interface!',
19
  examples=["llama.jpg"])
20
 
21
- iface.launch()
 
 
2
  import cv2
3
 
4
 
5
+ def inference(img, in_bright, in_contrast):
6
  new_img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
7
+ in_bright=1
8
+ in_contrast=50
9
  return new_img
 
10
 
11
  # For information on Interfaces, head to https://gradio.app/docs/
12
  # For user guides, head to https://gradio.app/guides/
13
  # For Spaces usage, head to https://huggingface.co/docs/hub/spaces
14
  iface = gradio.Interface(
15
  fn=inference,
16
+ inputs=['image',gr.Slider(0,100),gr.Slider(0,100)],
17
  outputs='image',
18
  title='Change Image',
19
  description='Interface!',
20
  examples=["llama.jpg"])
21
 
22
+ iface.launch()
23
+