Spaces:
Running
Running
seawolf2357
commited on
Update app.py
Browse files
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)
|