Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def generate_cocktail(mood, sweetness, sour, savory, bitter, flavor_association,
|
|
31 |
client = openai.OpenAI(api_key=os.environ["API_TOKEN"])
|
32 |
instruction = "Please provide a cocktail recipe given the mood and preference of the user.\n\n"
|
33 |
user_prompt = f"Mood: {mood}\nTaste: Sweetness {sweetness}/10, Sour {sour}/10, Savory {savory}/10, Bitter {bitter}/10\nFlavor Association: {flavor_association}\nDrinking Experience: {drinking_experience}\nLevel of Soberness: {soberness_level}\nAllergies: {allergies}\nAdditional Requests: {additional_requests}\n\nMake sure to avoid all allergic ingredients.\n\n"
|
34 |
-
output_format = "Please strictly follow this output format:\n\nCocktail Name:[name]\nIngredients:[ingredients]\nInstruction:[instruction]\nNotes:[notes]"
|
35 |
prompt = instruction + user_prompt + output_format
|
36 |
|
37 |
messages=[
|
|
|
31 |
client = openai.OpenAI(api_key=os.environ["API_TOKEN"])
|
32 |
instruction = "Please provide a cocktail recipe given the mood and preference of the user.\n\n"
|
33 |
user_prompt = f"Mood: {mood}\nTaste: Sweetness {sweetness}/10, Sour {sour}/10, Savory {savory}/10, Bitter {bitter}/10\nFlavor Association: {flavor_association}\nDrinking Experience: {drinking_experience}\nLevel of Soberness: {soberness_level}\nAllergies: {allergies}\nAdditional Requests: {additional_requests}\n\nMake sure to avoid all allergic ingredients.\n\n"
|
34 |
+
output_format = "Please strictly follow this output format:\n\nCocktail Name:[name]\nQuote:[one sentence quote related to the cocktail and the mood description]\nIngredients:[ingredients]\nInstruction:[instruction]\nNotes:[notes]"
|
35 |
prompt = instruction + user_prompt + output_format
|
36 |
|
37 |
messages=[
|