bupa1018 commited on
Commit
464f84c
·
1 Parent(s): 244862c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -24
app.py CHANGED
@@ -428,30 +428,6 @@ def initialize():
428
  llm = setup_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
429
 
430
  from langchain_community.document_loaders import TextLoader
431
-
432
-
433
- with tempfile.TemporaryDirectory() as tmp_dir_path:
434
-
435
- print("Temporary directory path:", tmp_dir_path)
436
-
437
- # Define a new sub-path to append
438
- new_sub_path = "new_folder"
439
-
440
- # Append the new sub-path to the temporary directory path
441
- home = os.path.join(tmp_dir_path, new_sub_path)
442
-
443
- embedding_model = HuggingFaceEmbeddings(model_name=EMBEDDING_MODEL_NAME)
444
- vectorstore = Chroma.from_texts(texts=doc_texts, embedding=embedding_model, persist_directory=home)
445
-
446
- print("Appended path stored in 'home':", home)
447
-
448
- api.upload_folder(
449
- folder_path=home,
450
- repo_id="bupa1018/KadiAPY_Coding_Assistant", # Replace with your Space ID
451
- repo_type="space" # Ensure repo type is 'space'
452
- )
453
- print(f"New folder created at: {home}")
454
-
455
 
456
  initialize()
457
 
 
428
  llm = setup_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
429
 
430
  from langchain_community.document_loaders import TextLoader
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
 
432
  initialize()
433