import pandas as pd import numpy as np # Define the number of samples num_samples = 1000 # Generate random data for GPU, RAM, and Processor gpu = np.random.randint(1, 11, size=num_samples) # Assuming GPU from 1 to 10 ram = np.random.randint(4, 33, size=num_samples) # Assuming RAM from 4GB to 32GB processor = np.random.randint(1, 9, size=num_samples) # Assuming processor cores from 1 to 8 # Calculate whether it is good for a transformer to run (binary: 0 or 1) # You would replace this logic with your actual criteria for determining suitability def is_good_for_transformer(gpu, ram, processor): return ((gpu >= 6) & (ram >= 16) & (processor >= 4)).astype(int) output = is_good_for_transformer(gpu, ram, processor) # Create a DataFrame data = pd.DataFrame({'GPU': gpu, 'RAM': ram, 'Processor': processor, 'Good_for_Transformer': output}) # Save the DataFrame to a CSV file data.to_csv(r'Data_csv\transformer_dataset.csv', index=False)