aiqtech commited on
Commit
366c350
ยท
verified ยท
1 Parent(s): 3d25d76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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-00005.parquet')
28
 
29
  # Parquet ํŒŒ์ผ ๋กœ๋“œ
30
  try:
@@ -34,10 +34,10 @@ try:
34
  print(f"์ปฌ๋Ÿผ: {df.columns}")
35
  except Exception as e:
36
  print(f"Parquet ํŒŒ์ผ ๋กœ๋“œ ์ค‘ ์˜ค๋ฅ˜ ๋ฐœ์ƒ: {e}")
37
- df = pd.DataFrame(columns=['question', 'answer']) # ๋นˆ DataFrame ์ƒ์„ฑ
38
 
39
  def get_answer(question):
40
- matching_answer = df[df['question'] == question]['answer'].values
41
  return matching_answer[0] if len(matching_answer) > 0 else None
42
 
43
  def respond(
 
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['instruction'] == question]['response_a'].values
41
  return matching_answer[0] if len(matching_answer) > 0 else None
42
 
43
  def respond(