auhide commited on
Commit
6dae39a
·
1 Parent(s): 2dd59d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -0
README.md CHANGED
@@ -41,6 +41,12 @@ recipe = tokenizer.batch_decode(output)[0]
41
  # Get the generated recipe - it is up until the 1st [SEP] token. It includes the ingredients.
42
  recipe = re.findall(r"\[ING\](.+?)\[SEP\]", recipe)[0]
43
 
 
 
 
 
 
 
44
  print("Име на рецепта/Recipe name:")
45
  pprint(title)
46
  print("\nРецепта/Recipe:")
 
41
  # Get the generated recipe - it is up until the 1st [SEP] token. It includes the ingredients.
42
  recipe = re.findall(r"\[ING\](.+?)\[SEP\]", recipe)[0]
43
 
44
+ # Format the output text:
45
+ recipe = recipe.replace("[ING]", "- ")
46
+ recipe = recipe.replace("[EOL]", "\n- ")
47
+ recipe = recipe.replace("[REC]", "\n\n")
48
+
49
+
50
  print("Име на рецепта/Recipe name:")
51
  pprint(title)
52
  print("\nРецепта/Recipe:")