Spaces:
Runtime error
Runtime error
Commit
·
46af882
1
Parent(s):
e147322
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
-
import os
|
|
|
|
| 2 |
token = os.getenv("githubpublictoken")
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|