camparchimedes commited on
Commit
eca1621
ยท
verified ยท
1 Parent(s): 2523335

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -1,4 +1,3 @@
1
- import chainlit as cl
2
  from langchain.embeddings.openai import OpenAIEmbeddings
3
  from langchain.document_loaders.csv_loader import CSVLoader
4
  from langchain.embeddings import CacheBackedEmbeddings
@@ -15,10 +14,11 @@ from langchain.prompts.chat import (
15
  import chainlit as cl
16
 
17
  # ---------------------------------------------------for backend looks, example file:----------------------------------
 
 
 
 
18
 
19
- #with open('/spaces/camparchimedes/Daysoff-Assistant-RAQA-t1/tree/main/.chainlit/config.toml', 'r') as file:
20
- #content = file.read()
21
- #print("config.toml:", content)
22
  # ------------------------------------------------------the end--------------------------------------------------------
23
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
24
 
@@ -92,17 +92,15 @@ async def init():
92
  )
93
 
94
  #menu_message = (
95
- #"Index built! Bare spรธr ivei..๐Ÿค“\n\n"
96
- # "Her er noen spรธrsmรฅl vi ofte ser iforbindelse med DaysOff firmahytteordning:\n"
97
- # + "\n".join([f"- {q}" for q in questions])
98
  #)
99
 
100
  #msg.content = menu_message
101
  msg.content = f"Index built! Bare spรธr ivei..๐Ÿค“"
102
  await msg.send()
103
 
104
- msg.content = f"Index built! Bare spรธr ivei..๐Ÿค“"
105
- #await msg.send()
106
 
107
  cl.user_session.set("chain", chain)
108
 
 
 
1
  from langchain.embeddings.openai import OpenAIEmbeddings
2
  from langchain.document_loaders.csv_loader import CSVLoader
3
  from langchain.embeddings import CacheBackedEmbeddings
 
14
  import chainlit as cl
15
 
16
  # ---------------------------------------------------for backend looks, example file:----------------------------------
17
+ import os
18
+
19
+ app_path = os.path.abspath(__file__)
20
+ print("[email protected]:", app_path)
21
 
 
 
 
22
  # ------------------------------------------------------the end--------------------------------------------------------
23
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
24
 
 
92
  )
93
 
94
  #menu_message = (
95
+ #"Index built! Bare spรธr ivei..\n\n"
96
+ #"Her er noen spรธrsmรฅl vi ofte ser i forbindelse med DaysOff firmahytteordning:\n"
97
+ #+ "\n".join([f"- {q}" for q in questions])
98
  #)
99
 
100
  #msg.content = menu_message
101
  msg.content = f"Index built! Bare spรธr ivei..๐Ÿค“"
102
  await msg.send()
103
 
 
 
104
 
105
  cl.user_session.set("chain", chain)
106