seawolf2357 commited on
Commit
c59691b
Β·
verified Β·
1 Parent(s): 895e853

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -3
app.py CHANGED
@@ -6,6 +6,27 @@ import asyncio
6
  import subprocess
7
  from datasets import load_dataset
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # λ‘œκΉ… μ„€μ •
10
  logging.basicConfig(level=logging.DEBUG, format='%(asctime)s:%(levelname)s:%(name)s: %(message)s', handlers=[logging.StreamHandler()])
11
 
@@ -25,9 +46,6 @@ SPECIFIC_CHANNEL_ID = int(os.getenv("DISCORD_CHANNEL_ID"))
25
  # λŒ€ν™” νžˆμŠ€ν† λ¦¬λ₯Ό μ €μž₯ν•  μ „μ—­ λ³€μˆ˜
26
  conversation_history = []
27
 
28
- # 법λ₯  데이터셋 λ‘œλ“œ
29
- law_dataset = load_dataset('csv', data_files='train_0.csv')
30
-
31
  class MyClient(discord.Client):
32
  def __init__(self, *args, **kwargs):
33
  super().__init__(*args, **kwargs)
 
6
  import subprocess
7
  from datasets import load_dataset
8
 
9
+
10
+ # ν˜„μž¬ μž‘μ—… 디렉토리 좜λ ₯
11
+ print("Current Working Directory:", os.getcwd())
12
+
13
+ # 데이터셋 파일 이름
14
+ data_file = 'train_0.csv'
15
+
16
+ # ν˜„μž¬ μž‘μ—… 디렉토리에 파일이 μžˆλŠ”μ§€ 확인
17
+ if os.path.exists(data_file):
18
+ print(f"File {data_file} exists in the current directory.")
19
+ else:
20
+ print(f"File {data_file} does not exist in the current directory.")
21
+ # μž‘μ—… 디렉토리 λ³€κ²½ (ν•„μš”ν•œ 경우)
22
+ os.chdir('/home/user/app')
23
+ print("Changed directory to:", os.getcwd())
24
+
25
+ # 데이터셋 λ‘œλ“œ
26
+ law_dataset = load_dataset('csv', data_files=data_file)
27
+ print("Dataset loaded successfully.")
28
+
29
+
30
  # λ‘œκΉ… μ„€μ •
31
  logging.basicConfig(level=logging.DEBUG, format='%(asctime)s:%(levelname)s:%(name)s: %(message)s', handlers=[logging.StreamHandler()])
32
 
 
46
  # λŒ€ν™” νžˆμŠ€ν† λ¦¬λ₯Ό μ €μž₯ν•  μ „μ—­ λ³€μˆ˜
47
  conversation_history = []
48
 
 
 
 
49
  class MyClient(discord.Client):
50
  def __init__(self, *args, **kwargs):
51
  super().__init__(*args, **kwargs)