aiqtech commited on
Commit
bed2f47
·
verified ·
1 Parent(s): 09d5d1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -6,8 +6,13 @@ import pandas as pd
6
 
7
  client = InferenceClient("CohereForAI/c4ai-command-r-plus", token=os.getenv("HF_TOKEN"))
8
 
 
 
 
 
 
9
  # CSV 파일 로드
10
- prompts_df = pd.read_csv('app.py/prompts.csv')
11
 
12
  def get_prompt(act):
13
  matching_prompt = prompts_df[prompts_df['act'] == act]['prompt'].values
 
6
 
7
  client = InferenceClient("CohereForAI/c4ai-command-r-plus", token=os.getenv("HF_TOKEN"))
8
 
9
+
10
+ # 현재 스크립트의 디렉토리를 기준으로 상대 경로 설정
11
+ current_dir = os.path.dirname(os.path.abspath(__file__))
12
+ csv_path = os.path.join(current_dir, 'prompts.csv')
13
+
14
  # CSV 파일 로드
15
+ prompts_df = pd.read_csv(csv_path)
16
 
17
  def get_prompt(act):
18
  matching_prompt = prompts_df[prompts_df['act'] == act]['prompt'].values