fengfeng2 commited on
Commit
008efbb
1 Parent(s): 07148e4
Files changed (4) hide show
  1. .vscode/1.cmd +0 -4
  2. .vscode/launch.json +1 -1
  3. .vscode/tasks.json +1 -1
  4. app.py +8 -11
.vscode/1.cmd DELETED
@@ -1,4 +0,0 @@
1
- @REM @echo off
2
- @REM cd ..
3
- @REM @REM call gitpull.cmd
4
- @REM start https://huggingface.co/spaces/fengfeng2/QiLinWu
 
 
 
 
 
.vscode/launch.json CHANGED
@@ -10,7 +10,7 @@
10
  "request": "launch",
11
  "program": "${workspaceFolder}/.vscode/1.py",
12
  "console": "integratedTerminal",
13
- "preLaunchTask": "task"
14
  }
15
  ]
16
  }
 
10
  "request": "launch",
11
  "program": "${workspaceFolder}/.vscode/1.py",
12
  "console": "integratedTerminal",
13
+ // "preLaunchTask": "task"
14
  }
15
  ]
16
  }
.vscode/tasks.json CHANGED
@@ -3,7 +3,7 @@
3
  {
4
  "type": "cppbuild",
5
  "label": "task",
6
- "command": "cd .vscode && 1.cmd",
7
  "args": [],
8
  }
9
  ],
 
3
  {
4
  "type": "cppbuild",
5
  "label": "task",
6
+ "command": "cd .vscode",
7
  "args": [],
8
  }
9
  ],
app.py CHANGED
@@ -1,15 +1,12 @@
1
- import numpy as np
2
  import gradio as gr
3
 
4
- def sepia(input_img):
5
- sepia_filter = np.array([
6
- [0.393, 0.769, 0.189],
7
- [0.349, 0.686, 0.168],
8
- [0.272, 0.534, 0.131]
9
- ])
10
- sepia_img = input_img.dot(sepia_filter.T)
11
- sepia_img /= sepia_img.max()
12
- return sepia_img
13
 
14
- demo = gr.Interface(sepia, gr.Image(), "image")
15
  demo.launch()
 
 
1
  import gradio as gr
2
 
3
+ def greet(name, intensity):
4
+ return "Hello, " + name + "!" * int(intensity)
5
+
6
+ demo = gr.Interface(
7
+ fn=greet,
8
+ inputs=["text", "slider"],
9
+ outputs=["text"],
10
+ )
 
11
 
 
12
  demo.launch()