Instructions to use Adarsh-aot/imagination_of_word with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Adarsh-aot/imagination_of_word with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Adarsh-aot/imagination_of_word") model = AutoModelForSeq2SeqLM.from_pretrained("Adarsh-aot/imagination_of_word", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download dataset_generator_program.py from Adarsh-aot/imagination_of_word: direct link, hf CLI and curl.
- Browser
- Download file 950 Bytes
-
https://huggingface.co/Adarsh-aot/imagination_of_word/resolve/main/dataset_generator_program.py
- Command line
-
hf download hf://Adarsh-aot/imagination_of_word/dataset_generator_program.py
-
curl -L -o dataset_generator_program.py https://huggingface.co/Adarsh-aot/imagination_of_word/resolve/main/dataset_generator_program.py
950 Bytes
| 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) |