Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ except Exception as e:
|
|
24 |
|
25 |
# ํ์ฌ ์คํฌ๋ฆฝํธ์ ๋๋ ํ ๋ฆฌ๋ฅผ ๊ธฐ์ค์ผ๋ก ์๋ ๊ฒฝ๋ก ์ค์
|
26 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
27 |
-
parquet_path = os.path.join(current_dir, 'train-00000-of-
|
28 |
|
29 |
# Parquet ํ์ผ ๋ก๋
|
30 |
try:
|
@@ -34,7 +34,7 @@ try:
|
|
34 |
print(f"์ปฌ๋ผ: {df.columns}")
|
35 |
except Exception as e:
|
36 |
print(f"Parquet ํ์ผ ๋ก๋ ์ค ์ค๋ฅ ๋ฐ์: {e}")
|
37 |
-
df = pd.DataFrame(columns=['
|
38 |
|
39 |
def get_answer(question):
|
40 |
matching_answer = df[df['question'] == question]['answer'].values
|
|
|
24 |
|
25 |
# ํ์ฌ ์คํฌ๋ฆฝํธ์ ๋๋ ํ ๋ฆฌ๋ฅผ ๊ธฐ์ค์ผ๋ก ์๋ ๊ฒฝ๋ก ์ค์
|
26 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
27 |
+
parquet_path = os.path.join(current_dir, 'train-00000-of-00001.parquet')
|
28 |
|
29 |
# Parquet ํ์ผ ๋ก๋
|
30 |
try:
|
|
|
34 |
print(f"์ปฌ๋ผ: {df.columns}")
|
35 |
except Exception as e:
|
36 |
print(f"Parquet ํ์ผ ๋ก๋ ์ค ์ค๋ฅ ๋ฐ์: {e}")
|
37 |
+
df = pd.DataFrame(columns=['instruction', 'response_a']) # ๋น DataFrame ์์ฑ
|
38 |
|
39 |
def get_answer(question):
|
40 |
matching_answer = df[df['question'] == question]['answer'].values
|