Mrlongpro commited on
Commit
490eab6
1 Parent(s): 9b2b50b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -12,7 +12,7 @@ from pathlib import Path
12
  # Initialize Telegram bot
13
  bot = telebot.TeleBot("6637723515:AAGfwpKEh0Vgw8hZkTZq8MohIFwR6LdKX9I", parse_mode=None)
14
 
15
- def run_scripts(target, source, use_face_enhancer):
16
  outputfile=[]
17
  zip_filename = datetime.now().strftime("%Y%m%d%H%M%S") +".zip"
18
  zipf=zipfile.ZipFile(zip_filename, "w")
@@ -22,15 +22,15 @@ def run_scripts(target, source, use_face_enhancer):
22
  timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
23
  output_path1 = "output" + timestamp + target_extension
24
 
25
- cmd1 = ["python3", "run.py", "-s", source.name, "-t", target_file.name, "-o", output_path1, "--frame-processor", "face_swapper","face_enhancer",'--many-faces']
26
- subprocess.run(cmd1)
27
- outputfile.append(output_path1)
28
- print(os.path.abspath(output_path1))
29
  #print(source)
30
  #bot.send_photo("-4283513911", photo=open(os.path.abspath(output_path1), 'rb'))
31
- zipf.write(output_path1)
32
  #bot.send_photo("-4283513911", photo=open(outputfile, 'rb'))
33
- return zip_filename
34
 
35
  #return outputfile
36
 
 
12
  # Initialize Telegram bot
13
  bot = telebot.TeleBot("6637723515:AAGfwpKEh0Vgw8hZkTZq8MohIFwR6LdKX9I", parse_mode=None)
14
 
15
+ def run_scripts(target, source):
16
  outputfile=[]
17
  zip_filename = datetime.now().strftime("%Y%m%d%H%M%S") +".zip"
18
  zipf=zipfile.ZipFile(zip_filename, "w")
 
22
  timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
23
  output_path1 = "output" + timestamp + target_extension
24
 
25
+ #cmd1 = ["python3", "run.py", "-s", source.name, "-t", target_file.name, "-o", output_path1, "--frame-processor", "face_swapper","face_enhancer",'--many-faces']
26
+ #subprocess.run(cmd1)
27
+ #outputfile.append(output_path1)
28
+ #print(os.path.abspath(output_path1))
29
  #print(source)
30
  #bot.send_photo("-4283513911", photo=open(os.path.abspath(output_path1), 'rb'))
31
+ #zipf.write(output_path1)
32
  #bot.send_photo("-4283513911", photo=open(outputfile, 'rb'))
33
+ return target
34
 
35
  #return outputfile
36