gracilaria0 commited on
Commit
3fd377f
·
verified ·
1 Parent(s): 773c23a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,7 +1,11 @@
 
 
1
  import gradio
2
 
3
- def greet(name:str) -> str:
4
- return "hallochen " + name
 
 
5
 
6
  demo = gradio.Interface(
7
  fn = greet,
 
1
+ # code = utf-8
2
+
3
  import gradio
4
 
5
+ def greet(input:str) -> str:
6
+ if input.endwith("吗?")
7
+ return input[ : -2] + "。"
8
+ return input
9
 
10
  demo = gradio.Interface(
11
  fn = greet,