Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you have screenshots of your GUI? #1

Open
PySimpleGUI opened this issue Oct 30, 2023 · 15 comments
Open

Do you have screenshots of your GUI? #1

PySimpleGUI opened this issue Oct 30, 2023 · 15 comments

Comments

@PySimpleGUI
Copy link

Hi there

Seems like you've made an interesting GUI, but I don't see any images of it. Did you happen to take any screenshots you can add to your readme?

@CognitiveCodes
Copy link
Owner

Sure, I can do it. It's still 'in pieces' with server and client(s) being (mostly) separate apps. Server uses Gradio because it allows to launch multiple websocket servers simultaneously on different ports, while clients can be written in pretty much anything - html, js, py - it doesn't actually matter.

@PySimpleGUI
Copy link
Author

Thank you very much! It was clear you had a graphical user interface and wanted to see what ya made. Thank you for sharing.

@CognitiveCodes
Copy link
Owner

No problem :) I won't pretend that it's nicely looking or particularly functional. for now I'm focusing mainly on the 'mechanical' aspects of the framework - that means on setting up Langchain in a way that won't end up with agents taking nonsensical actions... My idea is to make the system fully autonomous as fast as possible so that LLMs will be able to care about all the 'details' with minimal human input...

@PySimpleGUI
Copy link
Author

It looks fantastic. It IS functional enough. For me development happens sometimes from 2 or more directions that end up meeting in the middle, or some things wait until others are solid. I get it. Lived/live it, no explanation needed. I wanted to see the kinds of interface you're building to see what it would take to do a similar one in PySimpleGUI. I'm always on the lookout for interesting problems and interfaces.

@CognitiveCodes
Copy link
Owner

Great to know! Maybe by some chance you'll find some free time to try applying your own solutions in my project...? I try to get any form of GUI that can be integrated with python scripts and allow to display incoming messages in appropriate textboxes in 'real-time'. I managed to make it done with tkinkter but for some reason it works only for websocket clients:
https://github.com/CognitiveCodes/NeuralGPT/blob/main/Chat-center/TkDocsBot.py
when I try to run a websocket server using the same method the app stops responding together with the cmd window...
It might be possible with Gradio blocks but I don't know how to do it - I can only display text returned in response to a button click or other functions initialized from the level of gr.blocks - I have no clue how to display messages received via websocket connectivity since it's a process independent from Gradio app/interface...
It doesn't need to look nice or anything - all I need is a way to display incoming messages anywhere else than in cmd window (log)... :)

@PySimpleGUI
Copy link
Author

allow to display incoming messages in appropriate textboxes in 'real-time'

Very possible with PySimpleGUI... for sure.

There are a couple of approaches for something like this. I don't know your architecture so I'll ask a few questions.

PySimpleGUI runs in a couple of "modes". One is the most efficient..

  • Wait for something to happen, forever

Or a less efficient "polling mode"

  • Wait for X ms (or until some other event), wake up, see if there's something you want to do, then go back to sleep

If you are willing to work with threads, you can do polling or whatever you want over in the thread, run PySimpleGUI in the normal mode and send messages over to it from the thread. You can't call PySimpleGUI directly from a thread, but you can "send an event" that makes it through. It's an easy to follow design pattern.

I'm mega-slammed trying to get PySimpleGUI 5 out the door, but am happy to chat with you to better understand what you've got, what you want to do, etc. Part of PySimpleGUI 5 is a new ChatGPT client capable of running code produced. So this is an area of interest, even if my knowledge is so so low in the field.

image

@CognitiveCodes
Copy link
Owner

This is AWESOME! :D Thanks a lot!

@PySimpleGUI
Copy link
Author

I've done a couple of machine learning example projects:

https://github.com/PySimpleGUI/PySimpleGUI-Photo-Colorizer
https://github.com/PySimpleGUI/PySimpleGUI-YOLO

@CognitiveCodes
Copy link
Owner

This is exactly what I'm looking for :) I just hope it will be compatible with a websocket server - as not every interface handles it (tkinkter doesn't)

@PySimpleGUI
Copy link
Author

PySimpleGUI commented Oct 31, 2023

It depends on how the interface is done. tkinter can't be directly called from a thread.... and while PySimpleGUI runs on top of tkinter (among others), PySimpleGUI has a threading SDK that makes integrating threading into the GUI possible and easy.

Can you tell me what's involved and what tkinter isn't able to do?

EDIT:

A quick search of GitHub for PySimpleGUI and websocket I found these two repos that may have something helpfuli:

https://github.com/nelsonwenner/python-data-sampling-app
https://github.com/christian-drewes/simple-websocket-fuzzer

@CognitiveCodes
Copy link
Owner

Client works and look perfectly - now it's the most visually pleasant part in the whole project :) Thanks for the hint!
image

@PySimpleGUI
Copy link
Author

Oh WOW! I didn't expect you to just up and change your GUI. I was just asking some questions to see if there's a fit. VERY nicely done! image

This is the exact kind of visual that gets me excited to work hard on the project. I really appreciate the inspiration!

@CognitiveCodes
Copy link
Owner

server works just as smoothly :D
image
I can't believe how easy it is top use. If I knew about it 3 months ago right now I would have it ready ... :)

@CognitiveCodes
Copy link
Owner

Actually I just asked ChatGPT to change the interface from tkinkter to PySimpleGUI and it came up with ths in the first attempt :) :)

@CognitiveCodes
Copy link
Owner

I can also run multiple parallel websocket servers just like with gradio. Hahaha! And to think that I wasted at least 3 months trying to work with anything other than this interface. You just earned a hardcore supporter :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants