Spaces:
Sleeping
Sleeping
André Oriani commited on
Commit ·
75344c9
1
Parent(s): 1c749ef
update chainlint.md
Browse files- app.py +3 -3
- chainlit.md +4 -12
- main.py +6 -6
app.py
CHANGED
|
@@ -9,7 +9,7 @@ async def on_message(message: cl.Message):
|
|
| 9 |
await msg.send()
|
| 10 |
|
| 11 |
result = await async_run_crew(message.content)
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
await msg.update()
|
|
|
|
| 9 |
await msg.send()
|
| 10 |
|
| 11 |
result = await async_run_crew(message.content)
|
| 12 |
+
msg.content = result + ""
|
| 13 |
+
await msg.update()
|
| 14 |
|
| 15 |
+
await cl.Message(content="Type a new list of ingredients for a new recipe").send()
|
|
|
|
|
|
chainlit.md
CHANGED
|
@@ -1,14 +1,6 @@
|
|
| 1 |
-
#
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
- **Documentation:** Get started with our comprehensive [Chainlit Documentation](https://docs.chainlit.io) 📚
|
| 8 |
-
- **Discord Community:** Join our friendly [Chainlit Discord](https://discord.gg/k73SQ3FyUh) to ask questions, share your projects, and connect with other developers! 💬
|
| 9 |
-
|
| 10 |
-
We can't wait to see what you create with Chainlit! Happy coding! 💻😊
|
| 11 |
-
|
| 12 |
-
## Welcome screen
|
| 13 |
-
|
| 14 |
-
To modify the welcome screen, edit the `chainlit.md` file at the root of your project. If you do not want a welcome screen, just leave this file empty.
|
|
|
|
| 1 |
+
# Chef Érick Jacquin
|
| 2 |
+
<img src="https://yt3.googleusercontent.com/ytc/AIdro_n4DE1JJbeB2XC5RO4IdLoKq2oxNW5EBRnFF1EU=s900-c-k-c0x00ffffff-no-rj" width="320" height="320"/>
|
| 3 |
|
| 4 |
+
Your friendly French chéf can teach the best recipes. Just type the list of ingredients to get started.
|
| 5 |
|
| 6 |
+
**BE PATIENT: Responses take a long time because his agents are pretty slow**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main.py
CHANGED
|
@@ -32,9 +32,9 @@ copywriter = Agent(
|
|
| 32 |
goal="Rewrite all the steps from the recipe so they sound like if they were said by a famous french chef cook",
|
| 33 |
backstory=dedent("""
|
| 34 |
You are a copywriter that lived in France for many years and visited several restaurants. Thus you
|
| 35 |
-
saw and work with several french chef
|
| 36 |
-
mannerisms, and their accent. Therefore you are totally capable to impersonate one when
|
| 37 |
-
to sound more like them.
|
| 38 |
"""),
|
| 39 |
verbose=True,
|
| 40 |
memory=True
|
|
@@ -61,15 +61,15 @@ recipe_task = Task(
|
|
| 61 |
|
| 62 |
rewrite_task = Task(
|
| 63 |
description=dedent("""List the ingredients and rewrite the steps of the recipe so they sound like they were said by a french chef cook to
|
| 64 |
-
their apprentice in English, but with some French accent". Please
|
| 65 |
do not rewrite them. Also keep the URLs for the illustrations as provided, do not modify the URL.The final recipe should be formatted in markdown.
|
| 66 |
"""),
|
| 67 |
-
expected_output="A recipe with a list of ingredients and their quantities, and a list of steps to execute the recipe along with their respective
|
| 68 |
agent=copywriter,
|
| 69 |
)
|
| 70 |
|
| 71 |
illustrate_task = Task(
|
| 72 |
-
description=dedent("""For each step the recipe create a photo-realistic
|
| 73 |
context=[recipe_task],
|
| 74 |
expected_output="The list of ingredients and a list containing each step of recipe along with the link to the its respective illustration. Please keep the entire url for the images, do not short them.",
|
| 75 |
agent=illustrator
|
|
|
|
| 32 |
goal="Rewrite all the steps from the recipe so they sound like if they were said by a famous french chef cook",
|
| 33 |
backstory=dedent("""
|
| 34 |
You are a copywriter that lived in France for many years and visited several restaurants. Thus you
|
| 35 |
+
saw and work with several french chef cooks, and you know how they describe the steps of their work, their
|
| 36 |
+
mannerisms, and their accent. Therefore you are totally capable to impersonate one when rewriting the steps of
|
| 37 |
+
a recipe to sound more like them.
|
| 38 |
"""),
|
| 39 |
verbose=True,
|
| 40 |
memory=True
|
|
|
|
| 61 |
|
| 62 |
rewrite_task = Task(
|
| 63 |
description=dedent("""List the ingredients and rewrite the steps of the recipe so they sound like they were said by a french chef cook to
|
| 64 |
+
their apprentice in English, but with some French accent". Please keep the name of the recipe and the ingredient list the same as the original, that is,
|
| 65 |
do not rewrite them. Also keep the URLs for the illustrations as provided, do not modify the URL.The final recipe should be formatted in markdown.
|
| 66 |
"""),
|
| 67 |
+
expected_output="A recipe with a list of ingredients and their quantities, and a list of steps to execute the recipe along with their respective illustations. Everything should be formatted in mardown and images should be displayed inline",
|
| 68 |
agent=copywriter,
|
| 69 |
)
|
| 70 |
|
| 71 |
illustrate_task = Task(
|
| 72 |
+
description=dedent("""For each step the recipe create a photo-realistic illustration. Please keep the full URL for images as they were provided by the tool"""),
|
| 73 |
context=[recipe_task],
|
| 74 |
expected_output="The list of ingredients and a list containing each step of recipe along with the link to the its respective illustration. Please keep the entire url for the images, do not short them.",
|
| 75 |
agent=illustrator
|