Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,15 @@ from google.api_core.exceptions import InternalServerError
|
|
8 |
flag = False
|
9 |
repo = st.text_input(label="Paste the .git link of repository.")
|
10 |
btn = st.button(label="Submit")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
if btn and not flag:
|
12 |
clone_repo(repo=repo)
|
13 |
# if os.path.exists("githubCode") and os.path.isdir("githubCode"):
|
@@ -28,7 +37,6 @@ if btn and not flag:
|
|
28 |
# for word in response.split():
|
29 |
# yield word + " "
|
30 |
# time.sleep(0.05)
|
31 |
-
from util import clone_repo
|
32 |
from util import generate_assistant_response
|
33 |
|
34 |
st.title("Nile")
|
|
|
8 |
flag = False
|
9 |
repo = st.text_input(label="Paste the .git link of repository.")
|
10 |
btn = st.button(label="Submit")
|
11 |
+
|
12 |
+
def clone_repo(repo):
|
13 |
+
if os.path.exists("githubCode") and os.path.isdir("githubCode"):
|
14 |
+
print("File already exists!!")
|
15 |
+
pass
|
16 |
+
else:
|
17 |
+
print("Cloning repo!!")
|
18 |
+
git.Repo.clone_from(repo,"githubCode")
|
19 |
+
|
20 |
if btn and not flag:
|
21 |
clone_repo(repo=repo)
|
22 |
# if os.path.exists("githubCode") and os.path.isdir("githubCode"):
|
|
|
37 |
# for word in response.split():
|
38 |
# yield word + " "
|
39 |
# time.sleep(0.05)
|
|
|
40 |
from util import generate_assistant_response
|
41 |
|
42 |
st.title("Nile")
|