thhung commited on
Commit
fa95161
·
1 Parent(s): a28223d

[app] update logic clone

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -15,12 +15,21 @@ else:
15
  Repo.clone_from(git_url, repo_dir)
16
 
17
 
 
18
  # Specify the folder you want to move and the current folder path
19
  source_folder = "./temp/hnrecommender/"
 
20
  destination_folder = os.getcwd() # Gets the path of the current folder
 
 
 
 
 
 
 
21
 
22
  # Move the folder
23
- shutil.move(source_folder, destination_folder)
24
 
25
  import streamlit as st
26
 
 
15
  Repo.clone_from(git_url, repo_dir)
16
 
17
 
18
+
19
  # Specify the folder you want to move and the current folder path
20
  source_folder = "./temp/hnrecommender/"
21
+
22
  destination_folder = os.getcwd() # Gets the path of the current folder
23
+ # Check if the destination folder exists and remove it if it does
24
+ if os.path.exists(destination_folder):
25
+ shutil.rmtree(destination_folder)
26
+
27
+ # Copy the source folder to the destination
28
+ shutil.copytree(source_folder, destination_folder)
29
+
30
 
31
  # Move the folder
32
+ shutil.copy(source_folder, destination_folder)
33
 
34
  import streamlit as st
35