masanorihirano commited on
Commit
deb1174
·
1 Parent(s): 869d066
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -135,7 +135,7 @@ if torch.__version__ >= "2":
135
 
136
  def save_inputs_and_outputs(now, inputs, outputs, generate_kwargs):
137
  current_hour = now.strftime("%Y-%m-%d_%H")
138
- file_name = f"prompts_{LORA_WEIGHTS.split('/')[-1]}{current_hour}.jsonl"
139
 
140
  if repo is not None:
141
  repo.git_pull(rebase=True)
@@ -191,7 +191,7 @@ def evaluate(
191
  output = output.split("### 返答:")[1].strip()
192
  else:
193
  raise ValueError(f"No valid prompt ends. {prompt}")
194
- if HF_TOKEN:
195
  try:
196
  now = datetime.datetime.now()
197
  current_time = now.strftime("%Y-%m-%d %H:%M:%S")
 
135
 
136
  def save_inputs_and_outputs(now, inputs, outputs, generate_kwargs):
137
  current_hour = now.strftime("%Y-%m-%d_%H")
138
+ file_name = f"prompts_{LORA_WEIGHTS.split('/')[-1]}_{current_hour}.jsonl"
139
 
140
  if repo is not None:
141
  repo.git_pull(rebase=True)
 
191
  output = output.split("### 返答:")[1].strip()
192
  else:
193
  raise ValueError(f"No valid prompt ends. {prompt}")
194
+ if HF_TOKEN and DATASET_REPOSITORY:
195
  try:
196
  now = datetime.datetime.now()
197
  current_time = now.strftime("%Y-%m-%d %H:%M:%S")