Update app.py
Browse files
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", "
|
| 30 |
-
return "Error: CSV must contain exactly 'id' and '
|
| 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)
|