Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ model_checkpoint = "erwanlc/t5-cocktails_recipe-base"
|
|
6 |
tt_generator = pipeline("text2text-generation", model=model_checkpoint)
|
7 |
|
8 |
def generate_text(ingredients):
|
9 |
-
result = tt_generator(ingredients, min_length=20, max_length=1024, do_sample=True, temperature=1.0, top_p=1.0)
|
10 |
result = result[0]["generated_text"]
|
11 |
result_temp = result
|
12 |
all_matches = re.findall(r"([A-z][.])", result)
|
|
|
6 |
tt_generator = pipeline("text2text-generation", model=model_checkpoint)
|
7 |
|
8 |
def generate_text(ingredients):
|
9 |
+
result = tt_generator(ingredients.lower(), min_length=20, max_length=1024, do_sample=True, temperature=1.0, top_p=1.0)
|
10 |
result = result[0]["generated_text"]
|
11 |
result_temp = result
|
12 |
all_matches = re.findall(r"([A-z][.])", result)
|