Ludovicollin commited on
Commit
ebd39ea
·
1 Parent(s): 2c8b688

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -38,12 +38,12 @@ async def on_action(action):
38
  content.append(action.value)
39
  arrayContent = np.array(content)
40
  df = pd.DataFrame(arrayContent)
41
- with open('.chainlit/' + action.description + '.txt', 'wb') as csv_file:
42
  df.to_csv(path_or_buf=csv_file, index=False,header=False, encoding='utf-8')
43
  elements = [
44
  cl.File(
45
  name= action.description + ".txt",
46
- path="./.chainlit/" + action.description + ".txt",
47
  display="inline",
48
  ),
49
  ]
@@ -93,6 +93,7 @@ async def chat_profile():
93
  ]
94
  @cl.on_chat_start
95
  async def start():
 
96
  chat_profile = cl.user_session.get("chat_profile")
97
  chatProfile = chat_profile.split(' - ')
98
 
 
38
  content.append(action.value)
39
  arrayContent = np.array(content)
40
  df = pd.DataFrame(arrayContent)
41
+ with open('https://datast.univ-gustave-eiffel.fr/fileadmin/CIPEN/datas/assets/docs/' + action.description + '.txt', 'wb') as csv_file:
42
  df.to_csv(path_or_buf=csv_file, index=False,header=False, encoding='utf-8')
43
  elements = [
44
  cl.File(
45
  name= action.description + ".txt",
46
+ path="https://datast.univ-gustave-eiffel.fr/fileadmin/CIPEN/datas/assets/docs/" + action.description + ".txt",
47
  display="inline",
48
  ),
49
  ]
 
93
  ]
94
  @cl.on_chat_start
95
  async def start():
96
+ os.environ["TOKENIZERS_PARALLELISM"] = "false"
97
  chat_profile = cl.user_session.get("chat_profile")
98
  chatProfile = chat_profile.split(' - ')
99