sudoping01 commited on
Commit
29c8f24
·
verified ·
1 Parent(s): 9769901

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,8 +26,8 @@ def process_submission(submitter_name, csv_file):
26
  try:
27
  # Read and validate the uploaded CSV
28
  df = pd.read_csv(csv_file)
29
- if set(df.columns) != {"id", "prediction"}:
30
- return "Error: CSV must contain exactly 'id' and 'prediction' columns.", None
31
  if df["id"].duplicated().any():
32
  return "Error: Duplicate 'id's found in the CSV.", None
33
  if set(df["id"]) != set(references.keys()):
@@ -89,4 +89,4 @@ with gr.Blocks(title="Bambara ASR Leaderboard") as demo:
89
  outputs=[output_msg, leaderboard_display]
90
  )
91
 
92
- demo.launch()
 
26
  try:
27
  # Read and validate the uploaded CSV
28
  df = pd.read_csv(csv_file)
29
+ if set(df.columns) != {"id", "text"}:
30
+ return "Error: CSV must contain exactly 'id' and 'text' columns.", None
31
  if df["id"].duplicated().any():
32
  return "Error: Duplicate 'id's found in the CSV.", None
33
  if set(df["id"]) != set(references.keys()):
 
89
  outputs=[output_msg, leaderboard_display]
90
  )
91
 
92
+ demo.launch(share=True)