jezs00 / pycasso

A system to send AI generated art to an E-Paper display through a Raspberry PI unit
MIT License
76 stars 6 forks source link

New: Text read from file rather than image prompt #58

Closed djxie2019 closed 1 year ago

djxie2019 commented 1 year ago

Would be great if there was an option to pull the text displayed from a file instead? Use case is using GPT to write descriptions.

jezs00 commented 1 year ago

Hey mate,

Can you be a bit more specific on the use case? The text displayed is intrinsically linked to the image requested, so as far as I can picture it, having a separate text file to draw text would be complicated to link up to the request.

The only way I can see this working is either using GPT to write the prompts pre-request, or implementing a GPT API in the application itself.

On Mon, 7 Aug 2023 at 17:53, djxie2019 @.***> wrote:

Would be great if there was an option to pull the text displayed from a file instead? Use case is using GPT to write descriptions.

— Reply to this email directly, view it on GitHub https://github.com/jezs00/pycasso/issues/58, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUTEK7EJJN7JXD5I5BDL6CLXUCNI7ANCNFSM6AAAAAA3GS2XHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

djxie2019 commented 1 year ago

Sorry I could have been clearer.

Upon boot I have a script that pulls a subjects.txt file from a Home Assistant instance prior to running Pycasso, which dynamically generates the prompt based on the weather, time of day and season. For example, full moon shown in the image if it's a full moon, or browning/bare trees in fall/autumn, raining if raining.

I want to also grab a dynamically generated text descriptor from Home Assistant to display underneath the image, that describes current conditions in more granular detail, ie. the temperature, forecast or any noteworthy happenings in the smart home that day. Home Assistant already has ChatGPT built in to generate these.

Would also be good to have more control of the text, ie. wrapping. Love what you've created btw.

jezs00 commented 1 year ago

Great idea. Yes, that's definitely possible. It will require config updates, new file parser and appropriate insertion into the main program. Should unit test it too. I'll try and update it at some point.

On Tue, 8 Aug 2023 at 09:31, djxie2019 @.***> wrote:

Sorry I could have been clearer.

Upon boot I have a script that pulls a subjects.txt file from a Home Assistant instance prior to running Pycasso, which dynamically generates the prompt based on the weather, time of day and season. For example, full moon shown in the image if it's a full moon, or browning/bare trees in fall/autumn, raining if raining.

I want to also grab a dynamically generated text descriptor from Home Assistant to display underneath the image, that describes current conditions in more granular detail, ie. the temperature, forecast or any noteworthy happenings in the smart home that day. Home Assistant already has ChatGPT built in to generate these.

Would also be good to have more control of the text, ie. wrapping. Love what you've created btw.

— Reply to this email directly, view it on GitHub https://github.com/jezs00/pycasso/issues/58#issuecomment-1668702857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUTEK7GSRDXYQ5BCLKVTKSLXUF3E5ANCNFSM6AAAAAA3GS2XHE . You are receiving this because you commented.Message ID: @.***>

jezs00 commented 1 year ago

Should have the option to set override_text and override_path now in release 1.2.8.