I built my first AI project on a weekend.
Here are the 7 steps I followed:
I want to create a personal assistant. So I sat down and wrote what I needed:
- Something that can write text like humans. It sounds like a job for an LLM.
- A UI that allows the user to ask questions and the chatbot to respond.
- A simple way to publish this application.
You canโt train an LLM on a weekend, so borrow one; I used OpenAI, but you can use your own fine-tuned LLMs.
Now, for the fun parts, the UI, the code, and the hosting, I used Taipy.
Taipy is an open-source Python library designed for easy development of data-driven web applications.
It covers both the front-end and back-end, allowing users to develop the whole back-end of an application, model dataflows, and pipelines.
It was perfect for my weekend idea (and probably for many of your ideas, too).
With Taipy
You can build the whole back-end and the front-end without knowing much about HTML, CSS, and JS.
You have access to Taipy Cloud; designed to simplify web application development and deployment.
Everything starts here: โ$ pip install taipyโ
From then 7 simple steps:
1. Add your imports
2. Write the request and the send_message functions.
The โrequestโ function takes the user message as input and returns the response from the LLM.
The โsend_message โ function adds the user's message to the context, sends it to the API, and then displays the conversation.
3. Now, the only missing piece was the UI.
Taipy has a way to define pages by using Markdown strings. It cannot be easier.
I used a table to display the conversation and input so the user could type their message.
When the user presses enter, the UI calls the send_message() function.
4. I added some styling, and โฆ I have my own Personal Assistant.
5. From here, I just connected to Taipy Cloud, clicked on "Add Machine," filled in the fields, and added a new Application.
All this took me less than 5 minutes.
6. There is only one configuration pending.
Adding my environment variable to hold the OpenAIโs key. (Keep your keys out of source code)
7. Now for the final step: zip all files and upload, and click "Deploy app."
Wait for the deployment to complete, and share the link with the people you want to impress.
Taipy Platform Also:
- It helps you manage data flows and optimizes task performance and pipelines.
- It provides a Rest API.
- Includes a cache system that enables it to skip repetitive tasks.
- Supports Authentication/Authorization
Why did I choose Taipy over Streamlit?
- It is designed for both prototyping and production.
- It can scale.
- It provides much better performance.
- It supports large data.
- A lot of UI components.
- It is truly multi-user and provides for different user profiles.
Open-source AI is taking over the world, and Taipy is part of it.
Give them a star:
github.com/Avaiga/taipy
Disclaimer: This post was sponsored by Taipy.