kunishou commited on
Commit
771d1ed
·
verified ·
1 Parent(s): 2dd9280

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -31,7 +31,7 @@ def evaluate(
31
 
32
  lang = detect(instruction)
33
 
34
- if os.environ["PROMPT2"] not in message or lang == "ja":
35
  response = openai.ChatCompletion.create(
36
  model="gpt-3.5-turbo",
37
  # model="gpt-4",
@@ -52,7 +52,9 @@ def evaluate(
52
 
53
  csv_buffer = df_result.to_csv(index=False)
54
  s3.put_object(Bucket=bucket_name, Key=file_name, Body=csv_buffer)
55
-
 
 
56
  else:
57
  df_result.iloc[0, 2] = ""
58
  df_result.iloc[0, 3] = 0
 
31
 
32
  lang = detect(instruction)
33
 
34
+ if lang == "ja":
35
  response = openai.ChatCompletion.create(
36
  model="gpt-3.5-turbo",
37
  # model="gpt-4",
 
52
 
53
  csv_buffer = df_result.to_csv(index=False)
54
  s3.put_object(Bucket=bucket_name, Key=file_name, Body=csv_buffer)
55
+ elif os.environ["PROMPT2"] in message:
56
+ df_result.iloc[0, 2] = ""
57
+ df_result.iloc[0, 3] = 0
58
  else:
59
  df_result.iloc[0, 2] = ""
60
  df_result.iloc[0, 3] = 0