[www.indiegala.com] Discover your inner child with a collection of whimsical tales for children of all ages. Check out the newest Playground Tales eBook Bundle.
Have a Nice Death is a 2D action roguelike where you play as an overworked Death, whose employees have run rampant, completely throwing off the balance of souls - and his vacation plans. In order to restore order, you'll have to grab your trusty scythe and show your employees who's boss.
Since Death can't die, use what you've learned and earned to overcome the numerous minions and bosses in each department of Death Incorporated... over and over. A performance review after every run guarantees that you'll unlock interesting items and upgrades that will help you progress on your journey.
Hold onto your hats, folks! OpenAI has just introduced GPT-4, a colossal leap forward in deep learning.
This large multimodal model is more than just a text-based smarty-pants; it can process both images and text, producing text outputs that are nothing short of impressive.
Showdown: At the end of this article, I’ll let both GPT-3.5 and GPT-4 write a short story. You’ll be mind-blown by the difference!
But how does it stack up against its predecessor, GPT-3.5?
In this beginner-friendly blog post, we’ll break down the key differences, explain why GPT-4 is such a big deal, and give you some mind-blowing statistics to showcase its extraordinary capabilities.
Picture this: GPT-4 just took a simulated bar exam and scored in the top 10% of test-takers! To put that in perspective, GPT-3.5’s score was around the bottom 10%.
That’s a massive improvement, and it’s all thanks to OpenAI’s tireless efforts to fine-tune GPT-4 over six months using lessons from adversarial testing and ChatGPT. The result? Improved factuality, steerability, and adherence to guardrails.
The brainpower behind GPT-4 isn’t all software – there’s some serious hardware at play too.
Over the past two years, OpenAI rebuilt its entire deep learning stack, partnering with Azure to create a supercomputer specifically designed for their workload.
GPT-3.5 was like a test run — an impressive one nonetheless — allowing the team to work out the kinks and refine their approach.
And boy, did they succeed!
GPT-4’s training was stable and predictable, making it the first large model with performance that could be accurately forecasted ahead of time.
Text Input Capability: Now Available for Everyone!
GPT-4’s text input capabilities have been released via ChatGPT and the API (with a waitlist), so everyone can enjoy its remarkable advancements.
OpenAI is also working on its image input capability, collaborating with a single partner to prepare it for wider availability.
Plus, they’re open-sourcing OpenAI Evals, a framework for evaluating AI model performance, so you can help guide future improvements.
GPT-4 vs. GPT-3.5: The Showdown
When it comes to casual conversation, the differences between GPT-3.5 and GPT-4 might seem subtle. But the magic happens when the task complexity increases.
GPT-4 is more reliable, creative, and capable of handling nuanced instructions than GPT-3.5.
OpenAI tested both models on various benchmarks, including simulated exams designed for humans. GPT-4’s performance was nothing short of astonishing.
Above 50% is super-human average performance!
Beyond English: Multilingual Mastery
GPT-4 doesn’t just excel in English; it shines in other languages too.
OpenAI tested GPT-4 using the MMLU benchmark, a suite of 14,000 multiple-choice problems across 57 subjects, translated into various languages.
In 24 of 26 languages tested, GPT-4 outperformed GPT-3.5 and other large language models—even in low-resource languages like Latvian, Welsh, and Swahili!
A Handy Helper in the Office
GPT-4 isn’t just flexing its muscles in the lab; it’s making a real-world impact too.
OpenAI has been using GPT-4 internally for support, sales, content moderation, programming, and even evaluating AI outputs. It’s a versatile and powerful tool that’s ready to revolutionize the way we work.
GPT-4 is significantly better than previous versions in a wide variety of general-purpose skills:
Visual Inputs: A Sneak Peek into the Future
But wait, there’s more!
GPT-4 can also handle visual inputs, allowing users to prompt the model with both text and images. This means it can generate text outputs based on a variety of image types, like documents with text and photographs, diagrams, or screenshots.
GPT-4’s capabilities in this domain are similar to its text-only prowess and can be enhanced with test-time techniques developed for text-only language models, such as few-shot and chain-of-thought prompting.
Keep in mind that image inputs are still in the research preview stage and not yet publicly available.
Conclusion
In a nutshell, GPT-4 is the AI game-changer we’ve all been waiting for.
With human-level performance on various professional and academic benchmarks, impressive multilingual capabilities, and the ability to process both text and image inputs, it’s easy to see why GPT-4 is making waves in the AI community.
As OpenAI continues to refine and expand GPT-4’s capabilities, we can expect even more groundbreaking advancements in the near future. So, stay tuned, AI has never been more exciting!
GPT-4 is a multimodal model, capable of processing both text and image inputs.
It has shown human-level performance on various professional and academic benchmarks.
On a simulated bar exam, GPT-4 scored in the top 10% of test-takers, while GPT-3.5 scored in the bottom 10%.
OpenAI spent six months fine-tuning GPT-4 using lessons from adversarial testing and ChatGPT.
GPT-4 was tested on the MMLU benchmark, a suite of 14,000 multiple-choice problems across 57 subjects.
In 24 of the 26 languages tested on the MMLU benchmark, GPT-4 outperformed GPT-3.5 and other large language models.
OpenAI used GPT-4 internally for various tasks, including support, sales, content moderation, and programming.
GPT-4 can generate text outputs from inputs consisting of interspersed text and images.
The development of GPT-4 involved rebuilding OpenAI’s entire deep learning stack and co-designing a supercomputer with Azure.
GPT-4 considerably outperforms existing large language models and most state-of-the-art models on traditional benchmarks designed for machine learning models.
Appendix: GPT-3.5 vs GPT-4 Short Story
To showcase the new capabilities of GPT-4, I let both write a short story with the following prompt:
Write a funny soccer story for kids that teaches the kid that persistence is key for success in the style of Rowling.
Here’s the output of GPT-3.5:
Once upon a time, in a small village in England, there was a young boy named Harry who loved playing soccer more than anything in the world. He dreamed of one day playing for the famous Manchester United team, but he wasn't very good at it. Harry would spend hours every day practicing his soccer skills, but no matter how much he tried, he just couldn't seem to improve. His kicks were weak, his passes were sloppy, and he always seemed to trip over his own feet. One day, Harry heard that the Manchester United team was holding tryouts in his town. He knew that he wasn't good enough to make the team, but he decided to give it a try anyway. He put on his favorite soccer jersey, laced up his cleats, and headed to the field. When he arrived, he saw hundreds of other kids just like him, all vying for a chance to play for Manchester United. Harry watched as the other kids showed off their skills, dribbling the ball with ease, making perfect passes, and scoring goal after goal. Harry knew that he couldn't compete with those kids, but he refused to give up. He stepped up to the ball, took a deep breath, and kicked it with all his might. The ball flew into the air, wobbling and spinning wildly, and Harry watched in horror as it sailed straight into the goalpost and bounced back toward him. But Harry didn't give up. He chased after the ball, ignoring the snickers and jeers of the other kids, and kicked it again. And again. And again. Each time, the ball sailed in a different direction, bouncing off the other kids, the goalposts, and even the referee's head. But Harry didn't care. He was having the time of his life, and he refused to let anyone else bring him down. He kicked the ball with all his might, laughing and shouting and cheering himself on. And then, something amazing happened. The Manchester United coach, who had been watching the tryouts from the sidelines, walked up to Harry and tapped him on the shoulder. "Son," the coach said, "I've never seen anyone as persistent as you. You may not be the best soccer player on this field, but you have heart. And that's something that can't be taught." And with that, the coach offered Harry a spot on the Manchester United team. Harry couldn't believe his ears. He had made it! He had achieved his dream! From that day on, Harry worked harder than ever before, practicing every day and pushing himself to be the best he could be. And in the end, his persistence paid off. He became one of the greatest soccer players in the world, known not just for his skill, but for his determination and his unwavering spirit. So remember, kids: persistence is key. If you want to achieve your dreams, you can't give up. You have to keep pushing, keep trying, and keep kicking that soccer ball with all your might. Who knows? Maybe one day, you'll be the next Harry of the soccer world!
And here’s the impressive output of GPT-4, notice the unique use of words and creative ideas and turns in the storyline!
Once upon a time in the magical land of Fussballia, there lived a young and spirited soccer player named Jorrick Kickalot. Jorrick was no ordinary soccer player. He had an extraordinary talent of kicking soccer balls with the precision of a master archer. However, his small size made it difficult for him to make the local team, the Fussballia Falcons. Jorrick's best friend, a tiny but wise owl named Hootius Whistlebeak, would always accompany him to the games. One day, Hootius spotted a secret sign in the sky. It was an invitation to the legendary Flying Cleat Cup, a mysterious soccer tournament that only appeared once every 100 years. "Jorrick, this is your chance to prove yourself!" said Hootius excitedly, flapping his wings in anticipation. Together, they embarked on a long and treacherous journey to the secret location of the Flying Cleat Cup. They encountered peculiar creatures, such as the Zigzag Zephyrs, who could change the direction of the wind with a flick of their tails, and the elusive Balliphants, giant soccer balls with elephant trunks. Finally, they reached the hidden stadium, where they found teams of all shapes, sizes, and magical abilities. Jorrick felt nervous and unsure, but he remembered Hootius' words: "Persistence is the key to success!" The tournament began with a grand fanfare. In the first match, Jorrick and his makeshift team of magical creatures faced off against the towering Stomposaurs, a team of dinosaur-like creatures with powerful legs. Despite their intimidating size, Jorrick and his teammates worked together, and he managed to score the winning goal with a perfectly placed kick. In the next round, they faced the clever Whizbang Wizards, a team of magical beings who could make the ball disappear and reappear in the most unexpected places. Jorrick, however, was not to be outwitted. With Hootius' help, he kept a sharp eye on the ball and successfully led his team to another victory. The final match was against the reigning champions, the Enchanted Elves, known for their unmatched speed and agility. Jorrick was exhausted and felt the weight of the pressure on his shoulders. His legs were heavy, and his heart pounded in his chest. As the match began, the Enchanted Elves darted around the field, scoring goal after goal. It seemed like all hope was lost. But then, Hootius flew down to Jorrick and whispered, "Remember, persistence is the key to success!" With renewed determination, Jorrick summoned every ounce of strength he had left. He dodged, weaved, and kicked with all his might. Miraculously, he scored an equalizer in the final minutes of the game, sending it into extra time. In the final moments, Jorrick took a deep breath and prepared for a corner kick. He spotted Hootius in the stands, who gave him a reassuring nod. Jorrick took a step back, and with a powerful swing of his leg, sent the ball soaring through the air. The ball curved around the defenders, flew past the goalie, and nestled perfectly into the corner of the net. The stadium erupted in cheers as Jorrick's team celebrated their unexpected victory. They had won the Flying Cleat Cup, and Jorrick had proven that size did not matter when it came to playing soccer. Jorrick and Hootius returned home to Fussballia, where they were greeted as heroes. And from that day on, Jorrick Kickalot became a legend, not only for his incredible skills but also for his unwavering persistence. Young soccer players from all over the land would come to watch Jorrick play and learn from him. They admired not just his talent, but also his determination and grit. Jorrick always took the time to share his wisdom with the aspiring athletes, reminding them of the important lesson he had learned: "Persistence is the key to success!" As for Hootius Whistlebeak, he became the official mascot of the Fussballia Falcons, always encouraging the players to never give up, no matter the odds. Years later, the story of Jorrick Kickalot and his magical adventure at the Flying Cleat Cup became a beloved tale in Fussballia. Parents would tell their children the story of the young soccer player who, against all odds, achieved greatness through his sheer persistence and determination. And so, the legacy of Jorrick Kickalot lived on, inspiring generations of young soccer players to believe in themselves and never give up, no matter how tough the challenges they faced. They knew that if they could persist like Jorrick, they too could achieve their dreams and become the best soccer players they could be.
You play as Pseudo, a master of martial arts who lives as a recluse in the strange land of Zenozoik. When you cross paths with the Boy, a small creature whose mysterious powers have attracted the attention of Gemini, the Mistress of the Artifacts, you decide to protect him, unaware that much greater forces are involved.
Chenso Club - Free Steam GameChenso Club - Free Steam Game This game is region locked You would also need to link steam to fanatical and have an unlocked steam profile (level 8 i think)
How I Built an OpenAI-Powered Web Assistant with Django
5/5 – (1 vote)
Django is a backend web framework that makes it easy to build web pages quickly using Python. There is no better way to learn Django than by building projects. In this tutorial, I will show you how I built an Artificial Intelligence-powered web assistant using Django.
Set Up
To get started, we will create a directory where every file will live in. In the directory, we will create and activate a virtual environment. Then we will install the required Python libraries for the project. I am using an Ubuntu terminal, so a basic knowledge of the command line will be an added advantage going forward.
In the project directory, we create and activate a virtual environment using the source command. You can also replace the source command with a dot .. Let’s now install the modules we will be using.
pip install django tzdata openai
Creating Django Project
Once the installation is complete, run the following command in your Ubuntu terminal to create a Django project.
django-admin startproject webassistant .
This creates a folder with the name webassistant.
The . tells Django to create the project in the current directory.
The manage.py file is used to execute several Django commands.
The settings.py in the webassistant folder is the project’s settings. In it, we will register the Django apps we are about to create.
The urls.py is where we will let Django know what it should display to the user.
We now check to ensure that the installation went successfully. In your terminal run the following command:
python3 manage.py runserver
Once you have seen the above image, congrats! You have successfully installed Django. You can use control C to close the server.
Creating Django Apps
Back to your terminal, run the following command to create a Django app.
python3 manage.py startapp assistant
Use the ls command to see what’s inside the assistant folder.
ls assistant
__init__.py admin.py apps.py migrations models.py tests.py views.py
The __init__.py file found in both the webassistant and assistant folders enables the folders to be imported as a Python package. The views.py is where we code what we want the browser to be displayed to the user. These files are what concern our project. To know more about other files, check the documentation.
Next, we go to the settings.py file, in INSTALLED_APPS section to register the name of the app we just created. Use the nano command.
We also open the project’s urls.py file to register the app-level URLs.
from django.contrib import admin
from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('assistant.urls')),
]
The path() function is used to map the URL to the appropriate view. The include() function adds the URL of the app to the project-level urls.py. The empty quote means the home URL, that is, what we see when we run the local server.
If you have read Django tutorials including this one, you are gradually becoming familiar with the process. That’s how it is done in every Django application.
Getting the API Key
We need an API key to enable the OpenAI model to perform web assistant tasks for us. To get the API key, we first have to create an account on the official website of OpenAI. Once you have completed the signup process, go to the OpenAI API reference where you will be directed to a page to generate your API key.
We import the API key and the openai module. We use the openai.api_key to load the API key. Then, in the function, we requested to get the prompt, which is the question asked by the user. We then return the response generated by the model in form of a dictionary.
The temperature affects the randomness of the output, and it’s between 0 and 1. The AI model employed to generate predictions is the text_davinci_003. The max_tokens specifies the maximum number of tokens or pieces of words that can be generated by the model.
To learn more about the parameters, perhaps this article can be of help. We will now import the function in our views.py file.
from django.shortcuts import render, redirect
from .engine import model def home(request): try: if request.method == 'POST': context = model(request) return render(request, 'home.html', context) else: return render(request, 'home.html') except: return redirect('error') def error_handler(request): return render(request, 'error.html')
Two functions indicate two separate HTML files. In the first function, we use a try statement to check the block of code for errors. If no errors were found, the code under the try statement will execute. But if there were errors, the code under the except statement will be executed.
The if statement checks if the request method is POST, if so, it will generate a response from the OpenAI model. But if otherwise, the else statement will be run in which no response will be generated.
The render() function renders or displays a response in the HTML files which we are yet to create. Notice that in the else statement, the render() function just renders the same homepage without the context because the request method was not POST. The redirect() function is used to redirect a user to another webpage.
Let’s now write a URL in the urls.py file to display our contents.
assistant/urls.py from django.urls import path
from .import views urlpatterns = [ path('', views.home, name='home'), path('error', views.error_handler, name='error_handler'),
]
The name argument is kind of an alias for the URL. So instead of writing long URLs, we can just reference them with the name given. Mostly used in HTML files.
Templates
We now want to render our templates. Create a folder named templates in the current directory. This is where we will keep our HTML files. Having created the folder, go to settings.py and let Django know that a templates folder is created.
In the settings.py file, scroll down to the ‘TEMPLATES’ section and add the following to DIRS.
That’s our HTML boilerplate with bootstrap added to it for styling our web pages. Next is the home.html, the homepage that will inherit everything in the base.html template.
{% extends 'base.html' %}
{% block title %} Home {% endblock %}
{% block content %}
<div class="row justify-content-center my-4"> <div class="col-md-7 mt-4"> <div class="card"> <h1 class="card-header text-center">A.I WEB ASSISTANT</h1> <div class="card-body"> <pre>Hello, how can I help you?</pre> <form action="." method="POST"> <!-- this secures the form from malicious attacks during submission --> {% csrf_token %} <input class="form-control mb-2" required type="text" autofocus="autofocus" name="prompt" value="{{ prompt }}" id=""> <button class="btn btn-success fw-bold" type="submit"> GENERATE </button> </form> <hr> <pre> {{ response }} </pre> </div> </div> </div> </div>
</div>
{% endblock %}
Finally, the error.html will be displayed when an error occurs. It also inherits everything in the base.html.
{% extends 'base.html' %}
{% block title %} 404 {% endblock %}
{% block content %}
<div class="row justify-content-center my-4"> <div class="col-md-7 mt-4"> <h1>Page Not Found</h1> <p>Make sure you are connected to the internet or your query is correct</p> <a href="{% url 'home' %}" class="btn btn-secondary">Home</a> </div>
</div>
{% endblock %}
Certain things in these HTML files demand an explanation. Those strange syntaxes that begin with curly braces are Django templating language. When used with a block statement, it must end with an endblock statement. In base.html, we inserted the empty block statement in the title tag.
This makes it possible to override the home and error HTML files with a different word. But you can see the ‘Web Assistant’ remains the same in all files inheriting base.html.
The csrf_token is for security reasons. It’s compulsory. If you don’t add it, Django will throw an error. The prompt variable comes from the view.py file which in turn is imported from the engine.py file. The same applies to the response. Remember, we sent them here using the render() function.
The {% url 'home' %} syntax is Django’s way of displaying internal URLs. Go back to the app-level urls.py, you will see where we defined the name and this makes it possible to use it in HTML files.
Conclusion
Congrats on creating an AI-powered web assistant using Django. If you enjoy the tutorial, feel free to share it with others. Have a nice day.
Posted by: xSicKxBot - 03-13-2023, 01:31 AM - Forum: Python
- No Replies
Python to .exe – How to Make a Python Script Executable?
5/5 – (1 vote)
I have a confession to make. I use Windows for coding Python.
This means that I often need to run my practical coding projects as Windows .exe files, especially if I work with non-technical clients that don’t know how to run a Python file.
In this tutorial, I’ll share my learnings on making a Python file executable and converting them to an .exe so that they can be run by double-click.
PyInstaller
To make a Python script executable as a .exe file on Windows, use a tool like pyinstaller. PyInstaller runs on Windows 8 and newer.
Pyinstaller is a popular package that bundles a Python application and its dependencies into a single package, including an .exe file that can be run on Windows without requiring a Python installation.
Here are the general steps to create an executable file from your Python script using Pyinstaller:
Install Pyinstaller by opening a command prompt and running the command: pip install pyinstaller or pip3 install pyinstaller depending on your Python version.
Navigate to the directory where your Python script is located in the command prompt using cd (command line) or ls (PowerShell).
Run the command: pyinstaller --onefile your_script_name.py. This command creates a single executable file of your Python script with all its dependencies included.
After the command completes, you can find the executable file in a subdirectory called dist.
You can now distribute the executable file to users, who can run it on their Windows machines by double-clicking the .exe file.
What Does the –onefile Option Mean?
The --onefile file specifier is an option for Pyinstaller that tells it to package your Python script and all its dependencies into a single executable file.
By default, Pyinstaller will create a directory called dist that contains your script and a set of related files that it needs to run. However, using the --onefile option, Pyinstaller will generate a single .exe file, which is more convenient for the distribution and deployment of the application.
1-Paragraph Summary
To convert a Python file my_script.py to an executable my_script.exe using Pyinstaller, install Pyinstaller using pip install pyinstaller, navigate to the script directory in the command prompt, run pyinstaller --onefile my_script.py, then locate the executable file in the dist folder.
If you want to keep improving your coding skills, check out our free Python cheat sheets!