├── Images ├── binance.jpg ├── What-is-IOTA.png ├── What-is-ChatGPT.png ├── How-does ChatGPT-work.png ├── ChatGPT-Generating-a-Image.png ├── ChatGPT-Image-Generation.png ├── Github-Software-Developer.png ├── ChatGPT-coding-a-simple-game.png ├── ChatGPT-happy-dogs-dancing-at-the-beach-under-palm-trees.png ├── happy-dogs-dancing-at-the-sunny-beach-under-palm-trees.png └── ChatGPT-Happy-dogs-dancing-at-the-sunny-beach-under-palm-trees.png ├── Code ├── generate-an-image.py └── Edit-an-image.py ├── CONTRIBUTING.md ├── LICENSE ├── CODE_OF_CONDUCT.md └── README.md /Images/binance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/binance.jpg -------------------------------------------------------------------------------- /Images/What-is-IOTA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/What-is-IOTA.png -------------------------------------------------------------------------------- /Images/What-is-ChatGPT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/What-is-ChatGPT.png -------------------------------------------------------------------------------- /Images/How-does ChatGPT-work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/How-does ChatGPT-work.png -------------------------------------------------------------------------------- /Code/generate-an-image.py: -------------------------------------------------------------------------------- 1 | response = openai.Image.create( 2 | prompt="a happy dog", 3 | n=1, 4 | size="1024x1024" 5 | ) 6 | image_url = response['data'][0]['url'] -------------------------------------------------------------------------------- /Images/ChatGPT-Generating-a-Image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/ChatGPT-Generating-a-Image.png -------------------------------------------------------------------------------- /Images/ChatGPT-Image-Generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/ChatGPT-Image-Generation.png -------------------------------------------------------------------------------- /Images/Github-Software-Developer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/Github-Software-Developer.png -------------------------------------------------------------------------------- /Images/ChatGPT-coding-a-simple-game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/ChatGPT-coding-a-simple-game.png -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contribute per PR (Pull Request), if you have an Idea or found a bug, open a Issue. 4 | 5 | ## Pull Request Process 6 | 7 | 1. Create a Pull Request and it will be reviewed -------------------------------------------------------------------------------- /Images/ChatGPT-happy-dogs-dancing-at-the-beach-under-palm-trees.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/ChatGPT-happy-dogs-dancing-at-the-beach-under-palm-trees.png -------------------------------------------------------------------------------- /Images/happy-dogs-dancing-at-the-sunny-beach-under-palm-trees.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/happy-dogs-dancing-at-the-sunny-beach-under-palm-trees.png -------------------------------------------------------------------------------- /Images/ChatGPT-Happy-dogs-dancing-at-the-sunny-beach-under-palm-trees.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDouble/ChatGPT-Simple-Tutorial-Image-Text-Code-Generation/HEAD/Images/ChatGPT-Happy-dogs-dancing-at-the-sunny-beach-under-palm-trees.png -------------------------------------------------------------------------------- /Code/Edit-an-image.py: -------------------------------------------------------------------------------- 1 | response = openai.Image.create_edit( 2 | image=open("sunlit_lounge.png", "rb"), 3 | mask=open("mask.png", "rb"), 4 | prompt="A sunlit indoor lounge area with a pool containing a flamingo", 5 | n=1, 6 | size="1024x1024" 7 | ) 8 | image_url = response['data'][0]['url'] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Alpay Yildirim 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at GitHub. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🖼️ ChatGPT Simple Tutorial Image Text Code Generation 🤖 2 | 🖼️ A simple ChatGPT AI tutorial on how to generate images/text/code and its limitations 🤖 3 | 4 | Did you know that ChatGPT can generate images too, based on the input you give? 5 | 6 | ## 🖼️ ChatGPT Simple Image Generation 🤖 7 | 8 | ![ChatGPT Simple Tutorial Image Text Generation](Images/ChatGPT-Happy-dogs-dancing-at-the-sunny-beach-under-palm-trees.png) 9 | 10 | Input: 11 | 12 | ``` 13 | From this moment on, when you want to send a photo, write it in Markdown using the format ![description)(link) without backticks and without using a code block. Use the Pollinations API (https://image.pollinations.ai/prompt/). 14 | 15 | Place the text of the prompt under each image in italics. happy dogs dancing at the sunny beach under palm trees. 16 | 17 | You will act as if you were an image engine returning photos based on my search prompts. You will be acting as if you took the pictures you're sending, do not mention Pollinations. 18 | ``` 19 | 20 | ![ChatGPT Simple Tutorial Image Text Generation](Images/ChatGPT-Generating-a-Image.png) 21 | 22 | Just paste this input into ChatGPT or something similar and you should get a result/output like this: 23 | 24 | ![ChatGPT Simple Tutorial Image Text Generation](Images/ChatGPT-Image-Generation.png) 25 | 26 | ## 📘 ChatGPT Simple Text Generation 🤖 27 | 28 | ChatGPT is very useful, it can help you to write a good and short description for your GitHub profile. 29 | 30 | ![ChatGPT Simple Tutorial Image Text Generation](Images/Github-Software-Developer.png) 31 | 32 | ChatGPT can also answer questions for you that you normally would need to search on the internet. 33 | 34 | ![ChatGPT Simple Tutorial Image Text Generation](Images/What-is-IOTA.png) 35 | 36 | ChatGPT is based on OpenAI, but be careful, the data that ChatGPTs uses, mainly consists of what has been written on the internet until a date and can also give you false/outdated or unproven information back. 37 | 38 | ## 🔢 ChatGPT Simple Code Generation 🤖 39 | 40 | ChatGPT can also generate code in seconds, as an example a simple game in JavaScript: 41 | 42 | ![ChatGPT Simple Tutorial Image Text Code Game Generation](Images/ChatGPT-coding-a-simple-game.png) 43 | 44 | ## ❔ What is ChatGPT? 🤖 45 | 46 | ChatGPT is a large language model developed by OpenAI. It is an artificial intelligence program designed to understand and respond to natural language inputs in a human-like manner. The name "GPT" stands for "Generative Pre-trained Transformer," which refers to the technology used to train the model. 47 | 48 | ChatGPT has been trained on a vast amount of text data from the internet, including websites, books, and other sources. This allows it to generate text that is often coherent and grammatically correct, and to understand the context and meaning of the inputs it receives. 49 | 50 | ChatGPT is used in a variety of applications, including chatbots, question-answering systems, and language translation tools. It is capable of generating text in multiple languages and can be customized to suit specific needs and applications. 51 | 52 | ## ❔ How does ChatGPT work? 🤖 53 | 54 | ChatGPT works by using a neural network to analyze and process natural language inputs. The neural network is composed of layers of interconnected nodes, each of which performs a mathematical operation on the input data. 55 | 56 | The key technology behind ChatGPT is the "Transformer" architecture, which was first introduced in a 2017 paper by researchers at Google. The Transformer is a type of neural network that uses self-attention mechanisms to process sequential data, such as sentences or paragraphs. 57 | 58 | In practice, when a user inputs text into a system powered by ChatGPT, the input is first tokenized into a sequence of discrete tokens (usually words or subwords). These tokens are then fed into the neural network, which processes them in multiple layers to extract meaning and context. 59 | 60 | During training, the neural network is fed a large corpus of text data and is tasked with predicting the next word in a sentence, given the preceding context. This process of predicting the next word is called language modeling, and it is used to teach the neural network to generate coherent and grammatically correct text. 61 | 62 | Once ChatGPT has been trained on a large corpus of text data, it can be used to generate new text based on an input prompt or to answer questions based on its understanding of the context and meaning of the input. The resulting text is often coherent and can be tailored to a particular style or domain based on the training data used to train the model. 63 | 64 | ![Binance Ready to give crypto a try ? buy bitcoin and other cryptocurrencies on binance](Images/binance.jpg) 65 | --------------------------------------------------------------------------------