lampongyuen commited on
Commit
b648488
·
1 Parent(s): ce16992

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -19
app.py CHANGED
@@ -2,23 +2,6 @@ import gradio
2
  import cv2
3
  import numpy as np
4
 
5
- #def inference(img, in_bright):
6
- # new_img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
7
- # in_bright=1
8
- # return new_img
9
-
10
- #iface = gradio.Interface(
11
- # fn=inference,
12
- # inputs=['image',gradio.Slider(0,100)],
13
- # outputs='image',
14
- # title='Change Image',
15
- # description='Interface!',
16
- # examples=["llama.jpg"])
17
-
18
- #iface.launch()
19
-
20
- import gradio as gr
21
-
22
  def greet(image, name, is_morning, temperature):
23
  salutation = "Good morning" if is_morning else "Good evening"
24
  greeting = f"{salutation} {name}. It is {temperature} degrees today"
@@ -39,9 +22,9 @@ def greet(image, name, is_morning, temperature):
39
  return new_image, greeting, round(celsius, 2)
40
 
41
 
42
- demo = gr.Interface(
43
  fn=greet,
44
- inputs=['image',"text", "checkbox", gr.Slider(0, 100)],
45
  outputs=['image',"text", "number"],
46
  )
47
  demo.launch()
 
2
  import cv2
3
  import numpy as np
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  def greet(image, name, is_morning, temperature):
6
  salutation = "Good morning" if is_morning else "Good evening"
7
  greeting = f"{salutation} {name}. It is {temperature} degrees today"
 
22
  return new_image, greeting, round(celsius, 2)
23
 
24
 
25
+ demo = gradio.Interface(
26
  fn=greet,
27
+ inputs=['image',"text", "checkbox", gradio.Slider(0, 100)],
28
  outputs=['image',"text", "number"],
29
  )
30
  demo.launch()