IlyasMoutawwakil HF staff commited on
Commit
c27b8a4
1 Parent(s): f2144f5
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -69,7 +69,7 @@ def parse_configs(inputs):
69
 
70
 
71
  def run_benchmark(inputs, oauth_token: Optional[gr.OAuthToken]):
72
- if oauth_token.token is None or oauth_token.token == "":
73
  raise gr.Error("Please login to be able to run the benchmark.")
74
 
75
  timestamp = time.strftime("%Y-%m-%d-%H-%M-%S")
@@ -84,7 +84,6 @@ def run_benchmark(inputs, oauth_token: Optional[gr.OAuthToken]):
84
 
85
  for backend in BACKENDS:
86
  try:
87
- login(token=oauth_token.token)
88
  benchmark_name = f"{folder}/{backend}"
89
  benchmark_config = BenchmarkConfig(
90
  name=benchmark_name,
@@ -93,7 +92,6 @@ def run_benchmark(inputs, oauth_token: Optional[gr.OAuthToken]):
93
  scenario=configs[SCENARIO],
94
  )
95
  benchmark_report = Benchmark.launch(benchmark_config)
96
- logout()
97
 
98
  benchmark_config.push_to_hub(
99
  repo_id=BENCHMARKS_REPO_ID,
 
69
 
70
 
71
  def run_benchmark(inputs, oauth_token: Optional[gr.OAuthToken]):
72
+ if oauth_token is None:
73
  raise gr.Error("Please login to be able to run the benchmark.")
74
 
75
  timestamp = time.strftime("%Y-%m-%d-%H-%M-%S")
 
84
 
85
  for backend in BACKENDS:
86
  try:
 
87
  benchmark_name = f"{folder}/{backend}"
88
  benchmark_config = BenchmarkConfig(
89
  name=benchmark_name,
 
92
  scenario=configs[SCENARIO],
93
  )
94
  benchmark_report = Benchmark.launch(benchmark_config)
 
95
 
96
  benchmark_config.push_to_hub(
97
  repo_id=BENCHMARKS_REPO_ID,