avacaondata commited on
Commit
7b7b803
1 Parent(s): 0fe7255

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -20
README.md CHANGED
@@ -106,26 +106,6 @@ Además, debe tenerse en cuenta que el modelo base es de únicamente 1.5b parám
106
 
107
  You can start using this model through the Hugging Face API or integrate it into your applications using the transformers library. Here is an example of how to load the model:
108
 
109
- ```python
110
- from transformers import AutoModelForCausalLM, AutoTokenizer
111
- import torch
112
-
113
- model_name = "LenguajeNaturalAI/leniachat-gemma-2b-v0"
114
- tokenizer = AutoTokenizer.from_pretrained(model_name)
115
- model = AutoModelForCausalLM.from_pretrained(model_name)
116
-
117
- # Generar texto
118
- messages = [
119
- {"role": "system", "content": "Eres un asistente que ayuda al usuario a lo largo de la conversación resolviendo sus dudas."},
120
- {"role": "user", "content": "¿Qué fue la revolución industrial?"}
121
- ]
122
- input_ids = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt")
123
- with torch.no_grad():
124
- output = model.generate(input_ids, max_new_tokens=50)
125
- print(tokenizer.decode(output[0], skip_special_tokens=True))
126
- ```
127
-
128
-
129
  ## ¿Cómo empezar?
130
 
131
  Puedes empezar a utilizar este modelo a través de la API de Hugging Face o integrarlo en tus aplicaciones utilizando la biblioteca `transformers`. Aquí tienes un ejemplo de cómo cargar el modelo:
 
106
 
107
  You can start using this model through the Hugging Face API or integrate it into your applications using the transformers library. Here is an example of how to load the model:
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  ## ¿Cómo empezar?
110
 
111
  Puedes empezar a utilizar este modelo a través de la API de Hugging Face o integrarlo en tus aplicaciones utilizando la biblioteca `transformers`. Aquí tienes un ejemplo de cómo cargar el modelo: