Instructions to use MCS12/llama-3-xml-presentation-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MCS12/llama-3-xml-presentation-generator with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MCS12/llama-3-xml-presentation-generator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -75,7 +75,7 @@ class EndpointHandler:
|
|
| 75 |
|
| 76 |
return [{"generated_text": prediction}]
|
| 77 |
|
| 78 |
-
def apply_chat_template_for_presentation(tokenizer, content, tone="professional", length="medium"):
|
| 79 |
"""Format input using the model's chat template"""
|
| 80 |
|
| 81 |
# Create messages following Llama 3's chat format
|
|
|
|
| 75 |
|
| 76 |
return [{"generated_text": prediction}]
|
| 77 |
|
| 78 |
+
def apply_chat_template_for_presentation(self, tokenizer, content, tone="professional", length="medium"):
|
| 79 |
"""Format input using the model's chat template"""
|
| 80 |
|
| 81 |
# Create messages following Llama 3's chat format
|