ai01firebird commited on
Commit
c7b8f6c
·
verified ·
1 Parent(s): 9645123

fix prompt error

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def text_to_emoji(input_text):
14
  cleaned_text = re.sub(r"[.,!?;:]", "", input_text)
15
 
16
  # Pattern-based prompt with data from prompt_prefix
17
- prompt = "(\n" + "".join(f'"{line}\\n"\n' for line in train_data[0:3]) + f"\"{input_text} →\"" + ")"
18
 
19
  # Tokenisierung und Generation
20
  inputs = tokenizer(prompt, return_tensors="pt")
 
14
  cleaned_text = re.sub(r"[.,!?;:]", "", input_text)
15
 
16
  # Pattern-based prompt with data from prompt_prefix
17
+ prompt = "(\n" + "".join(f'"{line}\\n"\n' for line in prompt_prefix) + f"\"{input_text} →\"" + ")"
18
 
19
  # Tokenisierung und Generation
20
  inputs = tokenizer(prompt, return_tensors="pt")