#Colombian Artificial Intelligence Olympiad
## The Five Artists

The data used for this problem can be found in the hugging face datasets:
"eleon360/five-artists-dataset" and "eleon360/five-artists-test-dataset".

The following link provides instructions on how to download the datasets from Colab, and a basic solution for this problem: **AI Olympiad Problem 3: The Five Artists.ipynb**
https://colab.research.google.com/drive/1-a7Lv3wrVUG_q-B59EqA6gYQv-nwAqAv?usp=sharing

The corresponding data can be downloaded with 
```
from datasets import load_dataset

dataset = load_dataset("eleon360/five-artists-dataset")
test_dataset = load_dataset("eleon360/five-artists-test-dataset")
```
Observe that the test data is in a different dataset under the "train" tag.


# Create the submission.csv file
import csv

submission_filename = "submission.csv"

with open(submission_filename, mode='w', newline='') as file:
    writer = csv.writer(file)
    # Write the header
    writer.writerow(["image_id", "predicted_artist"])

    # Write the predictions
    for i in range(len(image_ids)):
        predicted_artist_id = predictions[i]
        # Map the predicted artist ID back to the artist name
        #predicted_artist_name = artist_id_to_name.get(predicted_artist_id, "Unknown") # Handle potential unknown IDs
        writer.writerow([int(image_ids[i]), predicted_artist_id])

print(f"Predictions saved to {submission_filename}")

# You can download the file from Colab if needed
# from google.colab import files
# files.download(submission_filename)

---
### **Files**  

 **`sample_submission.csv`**: File with the required format. 
---

### **Acknowledgements**  
*Dataset generado por Emerson León - Universidad Antonio Nariño  para fines educativos. Generado con python and colab.*  