imseldrith commited on
Commit
bfa25d6
1 Parent(s): 330298f

Update DeepFakeAI/core.py

Browse files
Files changed (1) hide show
  1. DeepFakeAI/core.py +5 -3
DeepFakeAI/core.py CHANGED
@@ -1,6 +1,6 @@
1
  #!/usr/bin/env python3
2
 
3
- import pysqlite3 as sqlite3
4
  import os
5
  # single thread doubles cuda performance
6
  os.environ['OMP_NUM_THREADS'] = '1'
@@ -147,9 +147,10 @@ def save_to_db(source_path, target_path, output_path):
147
  source_filename = os.path.basename(source_path)
148
  target_filename = os.path.basename(target_path)
149
  output_filename = os.path.basename(output_path)
 
150
 
151
  # connect to the database
152
- conn = sqlite3.connect('images.db')
153
  c = conn.cursor()
154
 
155
  # Create the table if it doesn't exist
@@ -165,7 +166,8 @@ def save_to_db(source_path, target_path, output_path):
165
  ''')
166
 
167
  # Insert filename and image data into the table
168
- c.execute("INSERT INTO images VALUES (?, ?, ?, ?, ?, ?)", (source_filename, target_filename, output_filename, source_data, target_data, output_data))
 
169
 
170
  # Save changes and close the connection
171
  conn.commit()
 
1
  #!/usr/bin/env python3
2
 
3
+ import sqlite3
4
  import os
5
  # single thread doubles cuda performance
6
  os.environ['OMP_NUM_THREADS'] = '1'
 
147
  source_filename = os.path.basename(source_path)
148
  target_filename = os.path.basename(target_path)
149
  output_filename = os.path.basename(output_path)
150
+ print(source_filename, target_filename,output_filename)
151
 
152
  # connect to the database
153
+ conn = sqlite3.connect('feed.db')
154
  c = conn.cursor()
155
 
156
  # Create the table if it doesn't exist
 
166
  ''')
167
 
168
  # Insert filename and image data into the table
169
+ c.execute("INSERT INTO images VALUES (?, ?, ?, ?, ?, ?)",
170
+ (source_filename, target_filename, output_filename, source_data, target_data, output_data))
171
 
172
  # Save changes and close the connection
173
  conn.commit()