rewisdomai commited on
Commit
46af882
·
1 Parent(s): e147322

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -1,6 +1,10 @@
1
- import os
 
2
  token = os.getenv("githubpublictoken")
3
 
4
- from git import Repo
5
- Repo.clone_from("https://zubairahmed-ai:"+ token +"@github.com/zubairahmed-ai/IndexFilesWithGPT.git",
6
- "/repo_directory")
 
 
 
 
1
+ import os, shutil
2
+ from git import Repo
3
  token = os.getenv("githubpublictoken")
4
 
5
+ currentpath = "repo_directory"
6
+ if os.path.exists(currentpath):
7
+ shutil.rmtree(currentpath)
8
+ os.mkdir(currentpath)
9
+
10
+ Repo.clone_from("https://zubairahmed-ai:"+ token +"@github.com/zubairahmed-ai/IndexFilesWithGPT.git", currentpath)