gracilaria0 commited on
Commit
ac6ab54
·
verified ·
1 Parent(s): 8177e9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -4,7 +4,10 @@ import gradio
4
 
5
  def greet(input:str) -> str:
6
  if input.endswith("吗?"):
7
- return input[ : -2] + "。"
 
 
 
8
  return input
9
 
10
  demo = gradio.Interface(
 
4
 
5
  def greet(input:str) -> str:
6
  if input.endswith("吗?"):
7
+ temp = input[ : -2] + "。"
8
+ temp = temp.replace("我", "#$&")
9
+ temp = temp.replace("你", "我")
10
+ return temp.replace("#$&", "你")
11
  return input
12
 
13
  demo = gradio.Interface(