Terry Zhuo commited on
Commit
80443f8
·
1 Parent(s): a2d883f
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -147,8 +147,6 @@ with gr.Blocks() as demo:
147
  def start_evaluation(command, jsonl_file, subset, split):
148
  extra = subset + "_" if subset != "full" else ""
149
  result_path = os.path.basename(jsonl_file.name).replace(".jsonl", f"_{extra}eval_results.json")
150
- with open(result_path, "w") as f:
151
- f.write("")
152
 
153
  for log in stream_logs(command, jsonl_file):
154
  yield log, gr.update(value=result_path, label=result_path), gr.update()
@@ -166,6 +164,5 @@ with gr.Blocks() as demo:
166
  inputs=[command_output, jsonl_file, subset, split],
167
  outputs=[log_output, download_btn])
168
 
169
- if __name__ == "__main__":
170
- demo.queue(max_size=300).launch(share=True, server_name="0.0.0.0", server_port=7860)
171
- scheduler = BackgroundScheduler()
 
147
  def start_evaluation(command, jsonl_file, subset, split):
148
  extra = subset + "_" if subset != "full" else ""
149
  result_path = os.path.basename(jsonl_file.name).replace(".jsonl", f"_{extra}eval_results.json")
 
 
150
 
151
  for log in stream_logs(command, jsonl_file):
152
  yield log, gr.update(value=result_path, label=result_path), gr.update()
 
164
  inputs=[command_output, jsonl_file, subset, split],
165
  outputs=[log_output, download_btn])
166
 
167
+ demo.queue(max_size=300).launch(share=True, server_name="0.0.0.0", server_port=7860)
168
+ scheduler = BackgroundScheduler()