NeuralGPT icon indicating copy to clipboard operation
NeuralGPT copied to clipboard

Do you have screenshots of your GUI?

Open PySimpleGUI opened this issue 2 years ago • 15 comments

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?

PySimpleGUI avatar Oct 30 '23 13:10 PySimpleGUI

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.

CognitiveCodes avatar Oct 30 '23 19:10 CognitiveCodes

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

PySimpleGUI avatar Oct 30 '23 20:10 PySimpleGUI

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...

CognitiveCodes avatar Oct 30 '23 23:10 CognitiveCodes

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.

PySimpleGUI avatar Oct 31 '23 11:10 PySimpleGUI

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)... :)

CognitiveCodes avatar Oct 31 '23 11:10 CognitiveCodes

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

PySimpleGUI avatar Oct 31 '23 12:10 PySimpleGUI

This is AWESOME! :D Thanks a lot!

CognitiveCodes avatar Oct 31 '23 12:10 CognitiveCodes

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

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

PySimpleGUI avatar Oct 31 '23 13:10 PySimpleGUI

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)

CognitiveCodes avatar Oct 31 '23 13:10 CognitiveCodes

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

PySimpleGUI avatar Oct 31 '23 17:10 PySimpleGUI

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

CognitiveCodes avatar Oct 31 '23 17:10 CognitiveCodes

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!

PySimpleGUI avatar Oct 31 '23 17:10 PySimpleGUI

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 avatar Oct 31 '23 17:10 CognitiveCodes

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

CognitiveCodes avatar Oct 31 '23 17:10 CognitiveCodes

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 :)

CognitiveCodes avatar Oct 31 '23 17:10 CognitiveCodes