mmaaz60 commited on
Commit
dce1c50
·
verified ·
1 Parent(s): 24c2856

Delete data/save_mcq.py

Browse files
Files changed (1) hide show
  1. data/save_mcq.py +0 -25
data/save_mcq.py DELETED
@@ -1,25 +0,0 @@
1
- from datasets import load_dataset
2
- import pandas as pd
3
- import os
4
-
5
- # Load the dataset from Hugging Face
6
- dataset = load_dataset("lmms-lab/MMVU", split="validation") # Change split if needed
7
-
8
- # Convert to pandas DataFrame
9
- df = dataset.to_pandas()
10
-
11
- # Inspect columns to find question type field
12
- print(df.columns)
13
- print(df.head())
14
-
15
- # Filter rows that are multiple-choice questions
16
- # Adjust 'question_type' to match the actual column name in MMVU
17
- mcq_df = df[df["question_type"] == "multiple-choice"]
18
-
19
- # Save to a new .parquet file
20
- output_path = "mmvu_mcq.parquet"
21
- mcq_df.to_parquet(output_path, index=False)
22
-
23
- print(f"Filtered dataset saved to {output_path}")
24
- print(f"Original size: {len(df)}, MCQ size: {len(mcq_df)}")
25
-