AI Text Paraphraser
🔑 ID:
55630
👨💻
Python
🕒
08/07/2024
Free
Description:
This code is part of a tutorial I posted on my blog.
It helps you paraphrase any piece of content in 3 styles based on these power prompts.
Code:
from SimplerLLM.tools.generic_loader import load_content from SimplerLLM.language.llm import LLM, LLMProvider from prompts import Academic, Kiddie, Shorten text = load_content("text.txt") #Edit the prompt name in accordance to what you want to convert it to final_prompt = Academic.format(input = text.content) llm_instance = LLM.create(provider=LLMProvider.OPENAI, model_name="gpt-4o") response = llm_instance.generate_response(prompt=final_prompt, max_tokens=1000) with open("response.txt", "w", encoding='utf-8') as f: f.write(response)
![Untitled design (82) Untitled design (82)](https://learnwithhasan.com/wp-content/uploads/elementor/thumbs/Untitled-design-82-qhbnhmws1asxq4eot8qww2hpj6cnytw92q1ofgpy3s.png)
GitHub Link
✖️ Not Available
![Untitled design (83) Untitled design (83)](https://learnwithhasan.com/wp-content/uploads/elementor/thumbs/Untitled-design-83-qhbnilot264jnp0665s3ybprifl8vmqbji6n6padpk.png)
Download File
✖️ Not Available
If you’re encountering any problems or need further assistance with this code, we’re here to help! Join our community on the forum or Discord for support, tips, and discussion.