Downloads · 30 days
6
9% of all-time downloads
jrodriiguezg/grape-chardonnay
grape-chardonnay is a machine learning model from jrodriiguezg. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Grape-chardonnay is a specialized lightweight AI model designed to translate natural language instructions (in Spanish) into executable Linux Bash commands. It is based on the Salesforce/codet5-small architecture and…
Downloads · 30 days
6
9% of all-time downloads
All-time downloads
68
Public
Repo size
227 MB
Likes
0
Public
Click a slice to open those files.
.onnx149 MB · 99%
From the Hugging Face model README
Grape-chardonnay is a specialized lightweight AI model designed to translate natural language instructions (in Spanish) into executable Linux Bash commands. It is based on the Salesforce/codet5-small architecture and has been fine-tuned to act as a local terminal assistant.
Contexto: ['pwd=current_path', 'ls=file_list'] | Natural language instructionThis model has been specifically trained to handle system administration tasks, file manipulation, and navigation while avoiding common hallucinations found in general-purpose models. It strictly adheres to context constraints (e.g., it will not invent file extensions like .xlsx if they do not exist).
This model is intended to be used as a CLI assistant or a backend for terminal applications where users input commands in Spanish.
touch, mkdir), moving (mv), copying (cp), and deleting (rm) files.cd with absolute and relative paths, distinguishing between "moving a file" and "changing directories."df -h, free -h, ip a, whoami, etc., without confusing them with file operations.rm) and "extract" (unzip/tar).cat/xdg-open) and "delete" (rm)..xlsx files when asked for a generic file).You can use this model with the transformers library.
from transformers import AutoTokenizer, T5ForConditionalGeneration
model_name = "jrodriiguezg/grape-chardonnay"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
# Define the context (simulated environment)
context = "Contexto: ['pwd=/home/user', 'ls=data.zip, notes.txt']"
instruction = "descomprime el archivo zip"
# Prepare input
input_text = f"translate Spanish to Bash: {context} | {instruction}"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
# Generate command
outputs = model.generate(input_ids, max_length=128)
command = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(command)
# Output: unzip data.zip