Beracles commited on
Commit
0259ec2
·
1 Parent(s): 23586d1

reform if condition

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -89,11 +89,8 @@ def run(hf_token, service, game, functionality, nlp_command):
89
  outp = {"status": "OK", "result": json.loads(res)["result"]}
90
  else:
91
  try:
92
- if service not in service_list[1:]:
93
- t = datetime.now()
94
- t = t.astimezone(ZoneInfo("Asia/Shanghai"))
95
- # t = t.replace(microsecond=0)
96
- print(f"{t} [{user_name}] [{game}] {nlp_command}")
97
  client = Client(
98
  url,
99
  hf_token=token,
 
89
  outp = {"status": "OK", "result": json.loads(res)["result"]}
90
  else:
91
  try:
92
+ if service == "games":
93
+ print(f"{beijing()} [{user_name}] [{game}] {nlp_command}")
 
 
 
94
  client = Client(
95
  url,
96
  hf_token=token,