Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def make_flashcards(words, language):
|
|
45 |
f"for each {language} word, create a list of the word, its definition, an example sentence using the word, and a translation of example sentence"
|
46 |
|
47 |
)
|
48 |
-
user_prompt = f"{system_prompt}\n\
|
49 |
|
50 |
input_ids = tokenizer.apply_chat_template([{"role": "user", "content": user_prompt}], return_tensors="pt").to(model.device)
|
51 |
output_ids = model.generate(input_ids, max_new_tokens=256)
|
|
|
45 |
f"for each {language} word, create a list of the word, its definition, an example sentence using the word, and a translation of example sentence"
|
46 |
|
47 |
)
|
48 |
+
user_prompt = f"{system_prompt}\n\nWords:\n{words}"
|
49 |
|
50 |
input_ids = tokenizer.apply_chat_template([{"role": "user", "content": user_prompt}], return_tensors="pt").to(model.device)
|
51 |
output_ids = model.generate(input_ids, max_new_tokens=256)
|