Spaces:
Sleeping
Sleeping
Aiswarya Sankar
commited on
Commit
·
9937bad
1
Parent(s):
9fcff82
Update version
Browse files
app.py
CHANGED
@@ -123,7 +123,7 @@ def index_repo(textbox: str, dropdown: str) -> Response:
|
|
123 |
|
124 |
print("Repo name after setting the value: " + str(repoName))
|
125 |
activeloop_username = "aiswaryas"
|
126 |
-
dataset_path = f"hub://{activeloop_username}/" + pathName + "
|
127 |
print(dataset_path)
|
128 |
|
129 |
try:
|
@@ -154,7 +154,7 @@ def index_repo(textbox: str, dropdown: str) -> Response:
|
|
154 |
pass
|
155 |
|
156 |
activeloop_username = "aiswaryas"
|
157 |
-
dataset_path = f"hub://{activeloop_username}/" + pathName + "
|
158 |
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
159 |
texts = text_splitter.split_documents(docs)
|
160 |
|
@@ -219,7 +219,7 @@ def answer_questions(question: str, github: str, **kwargs) -> Response:
|
|
219 |
try:
|
220 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
221 |
pathName = github.split('/')[-1]
|
222 |
-
dataset_path = "hub://aiswaryas/" + pathName + "
|
223 |
|
224 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
|
225 |
|
@@ -305,7 +305,7 @@ def generateFolderNamesForRepo(repo):
|
|
305 |
input data and generate the responses that are displayed in the UI.
|
306 |
"""
|
307 |
pathName = git_clone(repo)
|
308 |
-
root_dir = './' + pathName + "
|
309 |
|
310 |
files, dirs, docs = [], [], []
|
311 |
for dirpath, dirnames, filenames in os.walk(root_dir):
|
@@ -344,7 +344,7 @@ def generateDocumentationPerFolder(dir, github):
|
|
344 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
345 |
pathName = github.split('/')[-1]
|
346 |
print("PATH NAME: " + str(pathName))
|
347 |
-
dataset_path = "hub://aiswaryas/" + pathName + "
|
348 |
|
349 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
|
350 |
|
@@ -406,7 +406,7 @@ def solveGithubIssue(ticket, history) -> Response:
|
|
406 |
try:
|
407 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
408 |
pathName = github.split('/')[-1]
|
409 |
-
dataset_path = "hub://aiswaryas/" + pathName + "
|
410 |
|
411 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding=embeddings)
|
412 |
|
@@ -456,7 +456,7 @@ def bot(history, **kwargs):
|
|
456 |
try:
|
457 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
458 |
pathName = github.split('/')[-1]
|
459 |
-
dataset_path = "hub://aiswaryas/" + pathName + "
|
460 |
|
461 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
|
462 |
|
|
|
123 |
|
124 |
print("Repo name after setting the value: " + str(repoName))
|
125 |
activeloop_username = "aiswaryas"
|
126 |
+
dataset_path = f"hub://{activeloop_username}/" + pathName + "1000"
|
127 |
print(dataset_path)
|
128 |
|
129 |
try:
|
|
|
154 |
pass
|
155 |
|
156 |
activeloop_username = "aiswaryas"
|
157 |
+
dataset_path = f"hub://{activeloop_username}/" + pathName + "1000"
|
158 |
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
159 |
texts = text_splitter.split_documents(docs)
|
160 |
|
|
|
219 |
try:
|
220 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
221 |
pathName = github.split('/')[-1]
|
222 |
+
dataset_path = "hub://aiswaryas/" + pathName + "1000"
|
223 |
|
224 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
|
225 |
|
|
|
305 |
input data and generate the responses that are displayed in the UI.
|
306 |
"""
|
307 |
pathName = git_clone(repo)
|
308 |
+
root_dir = './' + pathName + "1000"
|
309 |
|
310 |
files, dirs, docs = [], [], []
|
311 |
for dirpath, dirnames, filenames in os.walk(root_dir):
|
|
|
344 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
345 |
pathName = github.split('/')[-1]
|
346 |
print("PATH NAME: " + str(pathName))
|
347 |
+
dataset_path = "hub://aiswaryas/" + pathName + "1000"
|
348 |
|
349 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
|
350 |
|
|
|
406 |
try:
|
407 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
408 |
pathName = github.split('/')[-1]
|
409 |
+
dataset_path = "hub://aiswaryas/" + pathName + "1000"
|
410 |
|
411 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding=embeddings)
|
412 |
|
|
|
456 |
try:
|
457 |
embeddings = OpenAIEmbeddings(openai_api_key="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")
|
458 |
pathName = github.split('/')[-1]
|
459 |
+
dataset_path = "hub://aiswaryas/" + pathName + "1000"
|
460 |
|
461 |
db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
|
462 |
|