Rooni commited on
Commit
570f004
·
verified ·
1 Parent(s): 2520dea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -12,13 +12,14 @@ def swap_face_api(source_img, target_img, doFaceEnhancer):
12
  try:
13
  api_key = get_random_api_key()
14
 
15
- client = Client("tuan2308/face-swap", api_key=api_key)
16
 
17
  result = client.predict(
18
  source_file=handle_file(source_img),
19
  target_file=handle_file(target_img),
20
  doFaceEnhancer=doFaceEnhancer,
21
- api_name="/predict"
 
22
  )
23
  return result
24
  except Exception as e:
 
12
  try:
13
  api_key = get_random_api_key()
14
 
15
+ client = Client("tuan2308/face-swap")
16
 
17
  result = client.predict(
18
  source_file=handle_file(source_img),
19
  target_file=handle_file(target_img),
20
  doFaceEnhancer=doFaceEnhancer,
21
+ api_name="/predict",
22
+ api_key=api_key
23
  )
24
  return result
25
  except Exception as e: