Build A Local LLM

Build fully custom AI application using top machine learning libraries like PyTorch, Tensorflow, Huggingface, OpenAI, etc. This tool will generate all the frontend and backend code of your AI. Follow the installation instructions to host the AI live on web.

[mwai-form-container id=”xc3fpdxf8″ theme=”ChatGPT”]
[mwai-form-field id=”mwai-ya151b13n” label=”AI Name” type=”input” name=”AI_NAME” options=”%5B%5D”]
[mwai-form-field id=”mwai-8d8tjcdy2″ label=”Choose a development stack” type=”select” name=”CHOOSE_A_DEVELOPMENT_STACK” options=”%5B%7B%22label%22%3A%22OpenAI%20GPT%22%2C%22value%22%3A%22OpenAI%20GPT%22%7D%2C%7B%22label%22%3A%22TensorFlow%20(TF)%22%2C%22value%22%3A%22TensorFlow%20(TF)%22%7D%2C%7B%22label%22%3A%22PyTorch%22%2C%22value%22%3A%22PyTorch%22%7D%2C%7B%22label%22%3A%22Hugging%20Face%20Transformers%22%2C%22value%22%3A%22Hugging%20Face%20Transformers%22%7D%2C%7B%22label%22%3A%22NLTK%20(Natural%20Language%20Toolkit)%22%2C%22value%22%3A%22NLTK%20(Natural%20Language%20Toolkit)%22%7D%2C%7B%22label%22%3A%22AllenNLP%22%2C%22value%22%3A%22AllenNLP%22%7D%5D”]
[mwai-form-field id=”mwai-ih8h46h0u” label=”What do you want the AI to do?” type=”textarea” name=”WHAT_DO_YOU_WANT_THE_AI_TO_DO” options=”%5B%5D” placeholder=”Give a detailed description prompt here.” rows=”4″]
[mwai-form-field id=”mwai-1g6ehhn5e” label=”Describe more about the AI here” type=”textarea” name=”DESCRIBE_MORE_ABOUT_THE_AI_HERE” options=”%5B%5D” rows=”4″]
[mwai-form-field id=”mwai-sqqqdyoqg” label=”Also build a frontend for this AI?” type=”select” name=”ALSO_BUILD_A_FRONTEND_FOR_THIS_AI” options=”%5B%7B%22label%22%3A%22Yes%22%2C%22value%22%3A%22Build%20a%20frontend%20for%20this%20AI%22%7D%2C%7B%22label%22%3A%22No%22%2C%22value%22%3A%22Don’t%20build%20a%20frontend%20for%20this%20AI%22%7D%5D”]
[mwai-form-submit id=”mwai-6gd1lppa8″ label=”Build AI Now” prompt=”Build%20a%20Python-based%20generative%20AI%20named%20%7BAI_NAME%7D%20using%20the%20%7BCHOOSE_A_DEVELOPMENT_STACK%7D%20library%20in%20Python.%20This%20is%20the%20prompt%20which%20the%20AI%20will%20work%20on%20%3A%20%7BWHAT_DO_YOU_WANT_THE_AI_TO_DO%7D.%20Do%20not%20change%20the%20code%20and%20place%20it%20as%20it%20is%20in%20the%20prompt%20section%20of%20the%20AI.%0A%0AThese%20are%20the%20additional%20instructions%20for%20the%20AI%20%3A%20%7BDESCRIBE_MORE_ABOUT_THE_AI_HERE%7D.%0A%0AMake%20sure%20that%20you%20install%20all%20the%20packages%20required%20for%20the%20code%20too..%20like%20open%2C%20tensorflow%2C%20etc.%20whatever%20required.%20Like%2C%20use%20the%20pip%20install%20thing%20too..%20if%20needed.%0A%0AAlso%2C%20explicitly%2C%20%7BALSO_BUILD_A_FRONTEND_FOR_THIS_AI%7D.%0A%0AMake%20sure%20it%20uses%20updated%20libraries%20and%20are%20built%20up%20to%20the%20global%20standards.%20Also%2C%20provide%20a%20way%20for%20users%20to%20add%20their%20API%20key%20in%20the%20AI%20and%20define%20the%20same%20in%20instructions%20too.%0A%0APlease%20just%20provide%20the%20codes%20and%20no%20instructions%20here.%20Give%20the%20result%20in%20this%20format%20%3A%0A%0AHere’s%20your%20AI%20code%20%3A%0A%0A%3Cpython%20code%20here%3E%0A%0AOne%20more%20thing%2C%20write%20down%20all%20codes%20under%20code%20snippets%20and%20not%20as%20regular%20text.%20Important.%0A%0AIf%20you%20are%20asked%20to%20build%20a%20frontend%2C%20build%20one%20using%20flask%20or%20using%20HTML%2C%20CSS%20and%20Javascript.%20Define%20explicitly%20that%20what%20you%20are%20developing.” output_element=”#mwai-k96iilzg4″ model=”” temperature=”0.8″ max_tokens=”4096″]

Your Code :

[mwai-form-container id=”ger3q07kr” theme=”ChatGPT”]
[mwai-form-output id=”mwai-k96iilzg4″]

Deploy A Local LLM On Web

Congrats on generating the LLM code! The next step is to deploy this LLM on web. Follow the below instructions :

General Instructions :

Codes generated for local LLMs are mostly in HTML and Python language. Therefore, to create a web deployment, we will utilise a web-based deployment framework called PyScript. This source material will guide you to achieve this goal.

Important URLs :

Pyscript framework : Pyscript.net
Pyscript platform : Pyscript.com

Simple Steps :

First, create a free account on Pyscript.com and create a new project.
The project comes with 3 files : index.html; main.py & pyscript.toml. 

Installation of packages :

Every AI/LLM system will require you to install several libraries AKA packages into the environment. The information of the packages are given at the end of the code base by Sttabot. For example, if your LLM requires the following package to be installed : 

				
					pip install torch flask
				
			

You will need to go to the pyscript.toml file and place the following code there : 

				
					package = ["flask" , "torch"]
				
			

Building the frontend :

You will then need to go to the index.html page and paste all the HTML, CSS and Javascript code there. If you do not have a combined code, you can always add a separate file for javascript and css by the name script.js and style.css.

Building the backend :

Finally, copy the Python (backend) code generated from Sttabot and paste it in the app.py file. 

Final Deployment:

Now click on Save & Run button and your chatbot is live. Copy the URL and share it with anyone.

Signup at Sttabot for free..

Signup For Local LLMs
OR