Spaces:
Sleeping
Sleeping
Aiswarya Sankar
commited on
Commit
·
a62d564
1
Parent(s):
5c87843
Update repoName as state
Browse files
app.py
CHANGED
@@ -106,14 +106,13 @@ def index_repo(textbox: str, dropdown: str) -> Response:
|
|
106 |
"GenerativeAgents": "https://github.com/joonspk-research/generative_agents.git"
|
107 |
}
|
108 |
|
109 |
-
repo_name.value = textbox
|
110 |
-
print("STATE VALUE: " + str(repo_name.value))
|
111 |
-
|
112 |
if textbox != "":
|
113 |
repo = textbox
|
114 |
else:
|
115 |
repo = mapping[dropdown[0]]
|
116 |
|
|
|
|
|
117 |
print("REPO NAME: " + str(repo))
|
118 |
pathName = git_clone(repo)
|
119 |
root_dir = './' + pathName
|
@@ -202,7 +201,8 @@ def index_repo(textbox: str, dropdown: str) -> Response:
|
|
202 |
|
203 |
def answer_questions(question: str, github: str, **kwargs) -> Response:
|
204 |
|
205 |
-
global repoName
|
|
|
206 |
github = repoName[:-4]
|
207 |
print("REPO NAME: " + github)
|
208 |
|
@@ -361,7 +361,8 @@ def solveGithubIssue(ticket, history) -> Response:
|
|
361 |
"""
|
362 |
This endpoint takes in a github issue and then queries the db for the question against the codebase.
|
363 |
"""
|
364 |
-
global repoName
|
|
|
365 |
global ticket_choices
|
366 |
github = repoName[:-4]
|
367 |
|
@@ -424,7 +425,8 @@ def bot(history, **kwargs):
|
|
424 |
|
425 |
user_message = history[-1][0]
|
426 |
|
427 |
-
global repoName
|
|
|
428 |
github = repoName[:-4]
|
429 |
try:
|
430 |
embeddings = OpenAIEmbeddings()
|
|
|
106 |
"GenerativeAgents": "https://github.com/joonspk-research/generative_agents.git"
|
107 |
}
|
108 |
|
|
|
|
|
|
|
109 |
if textbox != "":
|
110 |
repo = textbox
|
111 |
else:
|
112 |
repo = mapping[dropdown[0]]
|
113 |
|
114 |
+
repo_name.value = repo
|
115 |
+
print("STATE VALUE: " + str(repo_name.value))
|
116 |
print("REPO NAME: " + str(repo))
|
117 |
pathName = git_clone(repo)
|
118 |
root_dir = './' + pathName
|
|
|
201 |
|
202 |
def answer_questions(question: str, github: str, **kwargs) -> Response:
|
203 |
|
204 |
+
# global repoName
|
205 |
+
repoName = repo_name.value
|
206 |
github = repoName[:-4]
|
207 |
print("REPO NAME: " + github)
|
208 |
|
|
|
361 |
"""
|
362 |
This endpoint takes in a github issue and then queries the db for the question against the codebase.
|
363 |
"""
|
364 |
+
# global repoName
|
365 |
+
repoName = repo_name.value
|
366 |
global ticket_choices
|
367 |
github = repoName[:-4]
|
368 |
|
|
|
425 |
|
426 |
user_message = history[-1][0]
|
427 |
|
428 |
+
# global repoName
|
429 |
+
repoName = repo_name.value
|
430 |
github = repoName[:-4]
|
431 |
try:
|
432 |
embeddings = OpenAIEmbeddings()
|