Aiswarya Sankar commited on
Commit
45ae5b1
·
1 Parent(s): 29d27c0

Remove naming

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -113,7 +113,7 @@ def index_repo(textbox: str, dropdown: str) -> Response:
113
  root_dir = './' + pathName
114
 
115
  activeloop_username = "aiswaryas"
116
- dataset_path = f"hub://{activeloop_username}/" + pathName + "1000"
117
 
118
  try:
119
  db = DeepLake(dataset_path=dataset_path,
@@ -144,7 +144,7 @@ def index_repo(textbox: str, dropdown: str) -> Response:
144
  pass
145
 
146
  activeloop_username = "aiswaryas"
147
- dataset_path = f"hub://{activeloop_username}/" + pathName + "1000"
148
  text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
149
  texts = text_splitter.split_documents(docs)
150
 
@@ -207,7 +207,7 @@ def answer_questions(question: str, github: str, **kwargs) -> Response:
207
  try:
208
  embeddings = OpenAIEmbeddings()
209
  pathName = github.split('/')[-1]
210
- dataset_path = "hub://aiswaryas/" + pathName + "1000"
211
 
212
  print("before reading repo")
213
  db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
@@ -292,7 +292,7 @@ def generateFolderNamesForRepo(repo):
292
  input data and generate the responses that are displayed in the UI.
293
  """
294
  pathName = git_clone(repo)
295
- root_dir = './' + pathName + "1000"
296
 
297
  files, dirs, docs = [], [], []
298
  for dirpath, dirnames, filenames in os.walk(root_dir):
@@ -330,7 +330,7 @@ def generateDocumentationPerFolder(dir, github):
330
  # try:
331
  # embeddings = OpenAIEmbeddings()
332
  # pathName = github.split('/')[-1]
333
- # dataset_path = "hub://aiswaryas/" + pathName + "1000"
334
 
335
  # db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
336
 
@@ -382,7 +382,7 @@ def solveGithubIssue(ticket, history) -> Response:
382
  try:
383
  embeddings = OpenAIEmbeddings()
384
  pathName = github.split('/')[-1]
385
- dataset_path = "hub://aiswaryas/" + pathName + "1000"
386
 
387
  db = DeepLake(dataset_path=dataset_path, read_only=True, embedding=embeddings)
388
 
@@ -429,7 +429,7 @@ def bot(history, **kwargs):
429
  try:
430
  embeddings = OpenAIEmbeddings()
431
  pathName = github.split('/')[-1]
432
- dataset_path = "hub://aiswaryas/" + pathName + "1000"
433
 
434
  db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
435
  retriever = db.as_retriever()
 
113
  root_dir = './' + pathName
114
 
115
  activeloop_username = "aiswaryas"
116
+ dataset_path = f"hub://{activeloop_username}/" + pathName
117
 
118
  try:
119
  db = DeepLake(dataset_path=dataset_path,
 
144
  pass
145
 
146
  activeloop_username = "aiswaryas"
147
+ dataset_path = f"hub://{activeloop_username}/" + pathName
148
  text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
149
  texts = text_splitter.split_documents(docs)
150
 
 
207
  try:
208
  embeddings = OpenAIEmbeddings()
209
  pathName = github.split('/')[-1]
210
+ dataset_path = "hub://aiswaryas/" + pathName
211
 
212
  print("before reading repo")
213
  db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
 
292
  input data and generate the responses that are displayed in the UI.
293
  """
294
  pathName = git_clone(repo)
295
+ root_dir = './' + pathName
296
 
297
  files, dirs, docs = [], [], []
298
  for dirpath, dirnames, filenames in os.walk(root_dir):
 
330
  # try:
331
  # embeddings = OpenAIEmbeddings()
332
  # pathName = github.split('/')[-1]
333
+ # dataset_path = "hub://aiswaryas/" + pathName
334
 
335
  # db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
336
 
 
382
  try:
383
  embeddings = OpenAIEmbeddings()
384
  pathName = github.split('/')[-1]
385
+ dataset_path = "hub://aiswaryas/" + pathName
386
 
387
  db = DeepLake(dataset_path=dataset_path, read_only=True, embedding=embeddings)
388
 
 
429
  try:
430
  embeddings = OpenAIEmbeddings()
431
  pathName = github.split('/')[-1]
432
+ dataset_path = "hub://aiswaryas/" + pathName
433
 
434
  db = DeepLake(dataset_path=dataset_path, read_only=True, embedding_function=embeddings)
435
  retriever = db.as_retriever()