@@borismeinardus I have had a lot of fun getting your program to work on my Windows 10 computer. I did have to roll back the current customtkinter-5.0.03 version to customtkinter-4.6.3 to generate the image. Otherwise I was getting a "TypeError: __init__() missing 1 required positional argument" on line 21 (wanted a 'master' definition). But with the older version, the "magic" works! Still not able to save the generated image, I tried rolling back Pillow to 9.2.0 from 9.4.0 with no success. I am hoping you may have a suggestion, here is the error message I receive: Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32 = RESTART: C:\Users\dalleapp\app.py Image created for prompt: blue dogs and red chickens chase fish upstream to waterfall Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 1948, in __call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\customtkinter\widgets\ctk_button.py", line 377, in clicked self.command() File "C:\Users\dalleapp\app.py", line 48, in save_image img.save(f"img/{prompt}.png") File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\PIL\Image.py", line 2428, in save fp = builtins.open(filename, "w+b") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'img/blue_dogs_and_red_chickens_chase_fish_upstream_to_waterfall.png'
This video is very very very fantastic and I started interesting in AI fields because of your channel videos. Right now, I just started Python programming Day 1 from today. I promise I will try this as soon as I understand the python. I will try this one again. Thank you very much for this extraordinary video. I hope to see something like this more in your future videos. and also can you make a video of machine learning project like this one. please! 😊
Thank you, this is really well explained. But I am a newbie and want to ask something:), How could I implement this on an app where user creates an item and based on their title, app provides an image. There is a training project I work on and there are already files, app works but need to add this extension, I can't figure out which file I should work on
Well, you will have a front end that can capture text and button clicks. Then you need to associate an action to a button click (like I did in the video). Where and how you implement that action (in this case the generation of the image) is up to you. You might do it in a separate file for actions or you implement micro services that you then call with a button press. But simply adding the one function (similar to the one in the video) should be sufficient. I hope this helps :)
Very nice video! I have a question: Do you had to pay something to make this images? I trying to make a aplication to create Avatars, but i'm looking for alternatives for Stable Diffusion.
Thanks! Sounds like a cool idea! 👨🏻💻😊 I didn't have to pay to make the images because I used my initial free tokens. But otherwise you would have to pay, yes :/
Great video! Exactly what I was looking for. Looking forward to what comes next
Thanks!! I hope my future content will not disappoint you ☺️
@@borismeinardus I have had a lot of fun getting your program to work on my Windows 10 computer. I did have to roll back the current customtkinter-5.0.03 version to customtkinter-4.6.3 to generate the image. Otherwise I was getting a "TypeError: __init__() missing 1 required positional argument" on line 21 (wanted a 'master' definition). But with the older version, the "magic" works!
Still not able to save the generated image, I tried rolling back Pillow to 9.2.0 from 9.4.0 with no success. I am hoping you may have a suggestion, here is the error message I receive:
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32
= RESTART: C:\Users\dalleapp\app.py
Image created for prompt: blue dogs and red chickens chase fish upstream to waterfall
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 1948, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\customtkinter\widgets\ctk_button.py", line 377, in clicked
self.command()
File "C:\Users\dalleapp\app.py", line 48, in save_image
img.save(f"img/{prompt}.png")
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\PIL\Image.py", line 2428, in save
fp = builtins.open(filename, "w+b")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'img/blue_dogs_and_red_chickens_chase_fish_upstream_to_waterfall.png'
This video is very very very fantastic and I started interesting in AI fields because of your channel videos. Right now, I just started Python programming Day 1 from today. I promise I will try this as soon as I understand the python. I will try this one again.
Thank you very much for this extraordinary video. I hope to see something like this more in your future videos. and also can you make a video of machine learning project like this one. please! 😊
I‘m really happy to hear that!
Enjoy the ride, I‘m sure you‘ll do great if you stick to it 😊
I‘ll do my best 🫡 :)
You’re the reason I keep going bro you’re my inspiration ❤
always striving to make you proud!
promt_input = ctk.CTkEntry(
TypeError: CTkEntry.__init__() missing 1 required positional argument: 'master' can i know what it is?
you perhaps need to provide the root CTK element as the ‚master‘ argument
@@borismeinardus I have provided in this format ""master=root_CTk"" but it doesn't work any alternative format I need to give can you suggest!
provide master = None
how i can generate the auth_token ?
🙂🙂
You need to do that in your Browser when logged into your OpenAI account :)
Is it possible to call openai api in Android studio?
I‘m sadly not familiar with Android studio but I think yes :)
Thank you, this is really well explained. But I am a newbie and want to ask something:), How could I implement this on an app where user creates an item and based on their title, app provides an image. There is a training project I work on and there are already files, app works but need to add this extension, I can't figure out which file I should work on
Well, you will have a front end that can capture text and button clicks. Then you need to associate an action to a button click (like I did in the video). Where and how you implement that action (in this case the generation of the image) is up to you. You might do it in a separate file for actions or you implement micro services that you then call with a button press.
But simply adding the one function (similar to the one in the video) should be sufficient.
I hope this helps :)
@@borismeinardus thank you! It certainly does much more sense but we'll see if I can solve it :)). Subscribed for more, best of luck!
Very nice video! I have a question: Do you had to pay something to make this images? I trying to make a aplication to create Avatars, but i'm looking for alternatives for Stable Diffusion.
Thanks! Sounds like a cool idea! 👨🏻💻😊
I didn't have to pay to make the images because I used my initial free tokens. But otherwise you would have to pay, yes :/
I am getting an error
promt_input = ctk.CTkEntry(
^^^^^^^^^^^^^
TypeError: CTkEntry.__init__() missing 1 required positional argument: 'master'
you might need to provide the tkinter root element.
code is broken
hmm, weird :/ In my case it works
Which error are you getting?
@@Kirabyt3 I can't install PIL and authtoken
Bro please provide your source code
You can find a link to the code in the video description :)
im getting an error
main_image = tk.Canvas(app, width=512, height=512)
main_image.place(x=10, y=110)
prompt_input = ctk.CTkEntry(
height=40,
width=512,
text_font=("Arial", 20),
text_color="black:",
fg_color="white",
placeholder_text="Enter a prompt.",
)
prompt_input.place(x=10, y=10)
What does the error message say?
Maybe it could be the line
text_color="black"
You there have a ":" after the word "black"
@@borismeinardus I am having the same problem, the error is: TypeError: __init__() missing 1 required positional argument: 'master'