Update app.py
Browse files
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
|
96 |
-
|
97 |
-
|
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 |
|