Update README.md
Browse files
README.md
CHANGED
|
@@ -3,77 +3,71 @@ library_name: transformers
|
|
| 3 |
tags:
|
| 4 |
- trl
|
| 5 |
- sft
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
# Model Card for Model ID
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
|
| 13 |
|
| 14 |
## Model Details
|
| 15 |
|
| 16 |
### Model Description
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 21 |
|
| 22 |
-
- **Developed by:**
|
| 23 |
-
- **
|
| 24 |
-
- **
|
| 25 |
-
- **Model type:** [More Information Needed]
|
| 26 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 27 |
- **License:** [More Information Needed]
|
| 28 |
-
- **Finetuned from model
|
| 29 |
|
| 30 |
### Model Sources [optional]
|
| 31 |
|
| 32 |
-
<!-- Provide the basic links for the model. -->
|
| 33 |
-
|
| 34 |
- **Repository:** [More Information Needed]
|
| 35 |
- **Paper [optional]:** [More Information Needed]
|
| 36 |
- **Demo [optional]:** [More Information Needed]
|
| 37 |
|
| 38 |
## Uses
|
| 39 |
|
| 40 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 41 |
-
|
| 42 |
### Direct Use
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
### Downstream Use [optional]
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
[More Information Needed]
|
| 53 |
|
| 54 |
### Out-of-Scope Use
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
[More Information Needed]
|
| 59 |
|
| 60 |
## Bias, Risks, and Limitations
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
-
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
-
|
|
|
|
| 71 |
|
| 72 |
-
|
|
|
|
| 73 |
|
| 74 |
-
|
|
|
|
| 75 |
|
| 76 |
-
|
|
|
|
|
|
|
| 77 |
|
| 78 |
## Training Details
|
| 79 |
|
|
|
|
| 3 |
tags:
|
| 4 |
- trl
|
| 5 |
- sft
|
| 6 |
+
datasets:
|
| 7 |
+
- Hardik1234/reactjs_labelled
|
| 8 |
+
language:
|
| 9 |
+
- en
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for Model ID
|
| 13 |
|
| 14 |
+
This model generates React component code from natural language descriptions. It leverages the capabilities of the CodeGemma-2B model for text-to-code generation tasks.
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
## Model Details
|
| 18 |
|
| 19 |
### Model Description
|
| 20 |
|
| 21 |
+
This is a text-to-React component code generation model fine-tuned on the `Hardik1234/reactjs_labelled` dataset with CodeGemma-2B as the base model. It aims to assist developers by generating React component code from textual descriptions, streamlining the development process.
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
- **Developed by:** Pranav Keshav
|
| 24 |
+
- **Model type:** Text generation
|
| 25 |
+
- **Language(s) (NLP):** English
|
|
|
|
|
|
|
| 26 |
- **License:** [More Information Needed]
|
| 27 |
+
- **Finetuned from model :** google/codegemma-2b
|
| 28 |
|
| 29 |
### Model Sources [optional]
|
| 30 |
|
|
|
|
|
|
|
| 31 |
- **Repository:** [More Information Needed]
|
| 32 |
- **Paper [optional]:** [More Information Needed]
|
| 33 |
- **Demo [optional]:** [More Information Needed]
|
| 34 |
|
| 35 |
## Uses
|
| 36 |
|
|
|
|
|
|
|
| 37 |
### Direct Use
|
| 38 |
|
| 39 |
+
The model can be used to generate React component code from textual descriptions, such as "NavBar component," which can be integrated directly into React applications.
|
| 40 |
|
| 41 |
+
### Downstream Use
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
This model can be fine-tuned further for specific use cases or integrated into development tools and platforms to enhance developer productivity by automating code generation.
|
|
|
|
|
|
|
| 44 |
|
| 45 |
### Out-of-Scope Use
|
| 46 |
|
| 47 |
+
The model is not quite suitable for generating code for non-React frameworks or languages. It may also produce incorrect or non-functional code if the input description is unclear or ambiguous.
|
|
|
|
|
|
|
| 48 |
|
| 49 |
## Bias, Risks, and Limitations
|
| 50 |
|
| 51 |
+
### Recommendations
|
| 52 |
|
| 53 |
+
Users should be aware that the generated code may require manual verification and refinement. The model may also reflect biases present in the training data, and care should be taken to review and test the generated code thoroughly.
|
| 54 |
|
| 55 |
+
## How to Get Started with the Model
|
| 56 |
|
| 57 |
+
Use the code below to generate react component code from the model:
|
| 58 |
|
| 59 |
+
```python
|
| 60 |
+
from transformers import GemmaTokenizer, AutoModelForCausalLM
|
| 61 |
|
| 62 |
+
tokenizer = GemmaTokenizer.from_pretrained("PranavKeshav/reactgpt-1.2")
|
| 63 |
+
model = AutoModelForCausalLM.from_pretrained("PranavKeshav/reactgpt-1.2")
|
| 64 |
|
| 65 |
+
input_text = "PageNotFound component"
|
| 66 |
+
input_ids = tokenizer(input_text, return_tensors="pt")
|
| 67 |
|
| 68 |
+
outputs = model.generate(**input_ids)
|
| 69 |
+
print(tokenizer.decode(outputs[0]))
|
| 70 |
+
```
|
| 71 |
|
| 72 |
## Training Details
|
| 73 |
|