terryyz commited on
Commit
eb559f7
1 Parent(s): f70c6de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -175,20 +175,15 @@ with gr.Blocks() as demo:
175
  print(f"Result file: {result_file}")
176
  return (gr.update(label="Evaluation completed. Result file found."),
177
  gr.Button(visible=False),
178
- gr.DownloadButton(label="Download Result", value=result_file))
179
  else:
180
  return (gr.update(label="Evaluation completed. No result file found."),
181
- gr.Button("Run Evaluation"),
182
  gr.DownloadButton(visible=False))
183
 
184
  submit_btn.click(start_evaluation,
185
  inputs=[command_output, jsonl_file],
186
  outputs=[log_output, submit_btn, download_btn])
187
-
188
- # def update_logs(session_log_file):
189
- # return read_logs(session_log_file)
190
-
191
- # demo.load(update_logs, inputs=[session_log_file], outputs=[log_output], every=1)
192
 
193
  if __name__ == "__main__":
194
  demo.queue(max_size=300).launch(server_name="0.0.0.0", server_port=7860)
 
175
  print(f"Result file: {result_file}")
176
  return (gr.update(label="Evaluation completed. Result file found."),
177
  gr.Button(visible=False),
178
+ gr.DownloadButton("Download Result", value=result_file, visible=True))
179
  else:
180
  return (gr.update(label="Evaluation completed. No result file found."),
181
+ gr.Button("Run Evaluation", visible=True),
182
  gr.DownloadButton(visible=False))
183
 
184
  submit_btn.click(start_evaluation,
185
  inputs=[command_output, jsonl_file],
186
  outputs=[log_output, submit_btn, download_btn])
 
 
 
 
 
187
 
188
  if __name__ == "__main__":
189
  demo.queue(max_size=300).launch(server_name="0.0.0.0", server_port=7860)