dimasdeffieux commited on
Commit
8375dd0
·
verified ·
1 Parent(s): 3f9f26c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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\nText:\n{text}"
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)