mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-24 06:36:37 +00:00
bugfix
This commit is contained in:
parent
d7076c0fee
commit
8601cad45f
2
app.py
2
app.py
@ -475,7 +475,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
return json.dumps(error_json)
|
||||
|
||||
# The child process was successful.
|
||||
output_json = {"output": output, "execution_time": execution_time}
|
||||
output_json = {"output": output.decode("utf8"), "execution_time": execution_time}
|
||||
return json.dumps(output_json)
|
||||
return spawn_process(code)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Simple Question Answer":"User:@<Put your question here>@\nAssistant:",
|
||||
"Question Answer with conditionning":"Assistant is a highly developed AI capable of answering any question about any subject.\nUser:@<Put your question here>\nAssistant:",
|
||||
"Instruct mode": "Instructions:\n@<Put your instructions here>@\nAnswer:",
|
||||
"Make full python code": "```python\n# project: @<project name>@ \n# author: @<author of the project>@\n# description: @<The description of the code>@\n\n@<Place holder for text generation>@\n```\n---------\nExtra information:\nLicence: apache 2.0\nProgram type: Stand alone.\nDocumentation:\nMake README.md with the following table of contents:\n## Description\n## Installation\n## Usage\n## Licence\n## Contribute\n## Ethical guidelines\nInstructions:\nWrite a user side README.md\nStick to the provided code content and do not invent extra information.\nMake sure all sections of the table of contents are present in the file.\n----\nREADME.md:\n```markdown",
|
||||
"Make full python code": "```python\n# project: @<project name>@ \n# author: @<author of the project>@\n# description: @<The description of the code>@\n\n@<Place holder for text generation>@\n```\n---------\nExtra information:\nLicence: apache 2.0\nProgram type: Stand alone.\nDocumentation:\nMake README.md with the following table of contents:\n## Description\n## Installation\n## Usage\n## Licence\n## Contribute\n## Ethical guidelines\nInstructions:\nWrite a user side README.md\nStick to the provided code content and do not invent extra information.\nMake sure all sections of the table of contents are present in the file.\n----\nREADME.md:\n```markdown\n@<Place holder for text generation>@\n```",
|
||||
"Make a python function": "Here is a python function that @<describe the function you want lollms to build>@:\n```python\ndef",
|
||||
"Make a c++ function": "Here is a c++ function that @<describe the function you want lollms to build>@:\n```c++\n/*",
|
||||
"Make a c# function": "Here is a c# function that @<describe the function you want lollms to build>@:\n```c#\n/*",
|
||||
@ -16,5 +16,6 @@
|
||||
"Translate yaml file": "Instruction: Translate the comments and values of the yaml file from english to French.\nSession 1:\n```yaml language=english\n# This is a comment\nparameter_1: this is parameter 1\nparameter_2: this is parameter 2\nparameter_3: 25\nparameter_4: |\n This is a multi\n line parameter\n```\n```yaml language=french\n# Ceci est un commentaire\nparameter_1: ceci est le param\u00e8tre 1\nparameter_2: ceci est le param\u00e8tre 2\nparameter_3: 25\nparameter_4: |\n Ceci est une multiligne\n ligne de param\u00e8tre\n```\nSession 2:\n```yaml language=english\n@<Put your yaml data here>@\n```\n```yaml language=french",
|
||||
"Translate json file": "Instruction: Translate the values of the json file from english to French.\nSession 1:\n```json language=english\n{\n\"parameter_1\": \"this is parameter 1\",\n\"parameter_2\": \"this is parameter 2\",\n\"parameter_3\": 25,\n\"parameter_4\": \"This is a multi\\nline string\",\n}\n```\nAfter translation, we get:\n```json language=french\n{\n\"parameter_1\": \"ceci est le param\u00e8tre 1\",\n\"parameter_2\": \"ceci est le param\u00e8tre 2\",\n\"parameter_3\": 25,\n\"parameter_4\": \"Ceci est une cha\u00eene de caract\u00e8res multiligne\\n\",\n}\n```\nSession 2:\n```json language=english\n@<Put your json data here>@\n```\n```json language=french\n",
|
||||
"Translate python strings": "Instruction: Translate the strings inside this python code.\nSession 1:\n```python language=english\na = input(\"a:\")\nprint(f\"you have input the value {a}\")\n```\nAfter translation, we get:\n```python language=fr\na = input(\"a:\")\nprint(f\"vous avez entr\u00e9 la valeur {a}\")\n```\nSession 2:\n```python language=@<source language example: english>@\n@<Put your python code here>@\n```\n```python language=@<source language example: french>@\n@<Remove this placeholder and place the cursor in here then press Generate Text>@\n```\n",
|
||||
"Generic translator": "```@<put your source language name here. example english>@\n@<Put your english text here>@\n```\n```@<put your destination language name here. example french>@\n@<Remove this block and place the cursor here to make the AI generate the translation>@\n```\n"
|
||||
"Generic translator": "```@<put your source language name here. example english>@\n@<Put your english text here>@\n```\n```@<put your destination language name here. example french>@\n@<Remove this block and place the cursor here to make the AI generate the translation>@\n```\n",
|
||||
"lollms-video-description-template": "# lollms-video-description-template\n```bullet-points\n- lollms (lord of large language model) is a tool to use llms for text generation. It supports local AIs like llama and llama2 based models as well as remote text generation models.\n- lollms-playground is a module that allows the user to play around in an easy way with text generation. it features presets that allow conditionning of the generation\n- This is a youtube video about the use of the preset called Make full python code that helps the user make a full python code.\n- Extra information about the channel:\nFollow me on social media:\nyoutube: ParisNeo\ngithub: ParisNeo\nX (twitter): @SpaceNerduino\nDiscord channel: https://discord.gg/pcw62UMW\n\nProject path: https://github.com/ParisNeo/lollms-webui\n```\n```Youtube-script\nHi there. Today I'm going to show you how to use the lollms playground to make, debug, execute and document python code.\nLet's go.\nFirst, open the playground and look for the preset called \"Make full python code\". \nPress the validation button to put the preset content into the main input text area.\nNow you need to update the elements delimited by @< and >@. \nWe set the project title, the author and a description of the project.\nHere we will create a code that uses matplotlib to show a sine wave.\nNow press the generate text button to start generating the text.\nThe AI generates a code that can be tested using the button execute. If there is a bug, just correct it and regenerate.\nNow you can execute the code.\nIt works as expected.\nFinally, we can document the code we have just made. Just use the documentation text in the preset and run the generation.\nAs you can see, the AI gave a good README.md file that I can use on my github page.\nBe aware that the quality of the output depends on the model you are using. Make sure you use a good model for coding. You can checkout the models leaderboard on hugging face.\nI hope you liked this.\nDon't forget to like and subscribe.\nSee ya\n```\nFind a clickbate title\nVideo Title: How to make full python code with an AI - lollms-playground tutorial\nDescription: Learn how to use the awesome tool lollms-playground to make, debug, execute and document python code using only your voice. Just describe what you want to do and let the AI does it for you!"
|
||||
}
|
Loading…
Reference in New Issue
Block a user