AhmedSSoliman / MarianCG-DJANGO

huggingface.co
Total runs: 33
24-hour runs: 4
7-day runs: 7
30-day runs: 17
Model's Last Updated: July 30 2023
text-generation

Introduction of MarianCG-DJANGO

Model Details of MarianCG-DJANGO


PWC


MarianCG: a code generation transformer model inspired by machine translation

This model is to improve the solving of the code generation problem and implement a transformer model that can work with high accurate results. We implemented MarianCG transformer model which is a code generation model that can be able to generate code from natural language. This work declares the impact of using Marian machine translation model for solving the problem of code generation. In our implementation, we prove that a machine translation model can be operated and working as a code generation model. Finally, we set the new contributors and state-of-the-art on CoNaLa reaching a BLEU score of 30.92 and Exact Match Accuracy of 6.2 in the code generation problem with CoNaLa dataset.

MarianCG model and its implementation with the code of training and the generated output is available at this repository: https://github.com/AhmedSSoliman/MarianCG-NL-to-Code

DJANGO dataset is available at

https://huggingface.co/datasets/AhmedSSoliman/DJANGO

This model is avialable on the huggingface hub https://huggingface.co/AhmedSSoliman/MarianCG-DJANGO

# Model and Tokenizer
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# model_name = "AhmedSSoliman/MarianCG-NL-to-Code"
model = AutoModelForSeq2SeqLM.from_pretrained("AhmedSSoliman/MarianCG-DJANGO")
tokenizer = AutoTokenizer.from_pretrained("AhmedSSoliman/MarianCG-DJANGO")
# Input (Natural Language) and Output (Python Code)
NL_input = "define the method i with an argument self."
output = model.generate(**tokenizer(NL_input, padding="max_length", truncation=True, max_length=512, return_tensors="pt"))
output_code = tokenizer.decode(output[0], skip_special_tokens=True)

This model is available in spaces using gradio at: https://huggingface.co/spaces/AhmedSSoliman/MarianCG-DJANGO


Tasks: - Translation - Code Generation - Text2Text Generation - Text Generation

Citation

We now have a paper for this work and you can cite:

@article{soliman2022mariancg,
  title={MarianCG: a code generation transformer model inspired by machine translation},
  author={Soliman, Ahmed S and Hadhoud, Mayada M and Shaheen, Samir I},
  journal={Journal of Engineering and Applied Science},
  volume={69},
  number={1},
  pages={1--23},
  year={2022},
  publisher={SpringerOpen}
  url={https://doi.org/10.1186/s44147-022-00159-4}
}

Runs of AhmedSSoliman MarianCG-DJANGO on huggingface.co

33
Total runs
4
24-hour runs
5
3-day runs
7
7-day runs
17
30-day runs

More Information About MarianCG-DJANGO huggingface.co Model

MarianCG-DJANGO huggingface.co

MarianCG-DJANGO huggingface.co is an AI model on huggingface.co that provides MarianCG-DJANGO's model effect (), which can be used instantly with this AhmedSSoliman MarianCG-DJANGO model. huggingface.co supports a free trial of the MarianCG-DJANGO model, and also provides paid use of the MarianCG-DJANGO. Support call MarianCG-DJANGO model through api, including Node.js, Python, http.

AhmedSSoliman MarianCG-DJANGO online free

MarianCG-DJANGO huggingface.co is an online trial and call api platform, which integrates MarianCG-DJANGO's modeling effects, including api services, and provides a free online trial of MarianCG-DJANGO, you can try MarianCG-DJANGO online for free by clicking the link below.

AhmedSSoliman MarianCG-DJANGO online free url in huggingface.co:

https://huggingface.co/AhmedSSoliman/MarianCG-DJANGO

MarianCG-DJANGO install

MarianCG-DJANGO is an open source model from GitHub that offers a free installation service, and any user can find MarianCG-DJANGO on GitHub to install. At the same time, huggingface.co provides the effect of MarianCG-DJANGO install, users can directly use MarianCG-DJANGO installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

MarianCG-DJANGO install url in huggingface.co:

https://huggingface.co/AhmedSSoliman/MarianCG-DJANGO

Url of MarianCG-DJANGO

Provider of MarianCG-DJANGO huggingface.co

AhmedSSoliman
ORGANIZATIONS

Other API from AhmedSSoliman