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

[Feat] Add support for streamlit #11

Closed
goncaloalves opened this issue Feb 20, 2023 · 12 comments · Fixed by #74
Closed

[Feat] Add support for streamlit #11

goncaloalves opened this issue Feb 20, 2023 · 12 comments · Fixed by #74
Assignees
Labels
enhancement New feature or request

Comments

@goncaloalves
Copy link

Is it possible to add support for Streamlit?

I think that using the components API from streamlit and a Jinja template that puts the HTML and Javascript file into one this is possible.

@leandroimail
Copy link

PyGWalker is an amazing library. Congrats for your job. I have the same issue the @goncaloalves . For me will be very useful if it could use PyGWalker together streamlit.

@Asm-Def Asm-Def self-assigned this Feb 21, 2023
@ObservedObserver ObservedObserver added the enhancement New feature or request label Feb 22, 2023
@Asm-Def Asm-Def changed the title Add support for streamlit [Feat] Add support for streamlit Mar 1, 2023
@Asm-Def
Copy link
Collaborator

Asm-Def commented Mar 9, 2023

Hello, welcome to make an early trial of Streamlit support with

!pip install git+https://github.com/Kanaries/pygwalker.git@streamlit-dev

import pygwalker as pyg
pyg.walk(df, env='Streamlit')

UPD: the branch streamlit-dev was only for trial and has been deleted after being merged into main.

@Asm-Def
Copy link
Collaborator

Asm-Def commented Mar 9, 2023

released in pygwalker>=0.1.4.9.

@fyenne
Copy link

fyenne commented Mar 13, 2023

thank you, it seems I can only visit on localhost, but from network url, it returns error:

tornado.websocket.WebSocketClosedError
tornado.iostream.StreamClosedError: Stream is closed

@Asm-Def
Copy link
Collaborator

Asm-Def commented Mar 13, 2023

thank you, it seems I can only visit on localhost, but from network url, it returns error:

tornado.websocket.WebSocketClosedError
tornado.iostream.StreamClosedError: Stream is closed

Thanks for your feedback, we'll take care of it later.

@Asm-Def Asm-Def reopened this Mar 13, 2023
@fyenne
Copy link

fyenne commented Mar 13, 2023

谢谢老哥, 这个包真的很棒!

@ysj0226
Copy link
Contributor

ysj0226 commented Mar 13, 2023

thank you, it seems I can only visit on localhost, but from network url, it returns error:

tornado.websocket.WebSocketClosedError
tornado.iostream.StreamClosedError: Stream is closed

I'm sorry I don't have a lot of experience with streamlit. But the problem seems to arise frequently during use.
One problem is that I'm not sure what network means. Does it mean access to streamlit that someone else has deployed, or some streamlit that is in the cloud, or some service that integrates stremlit
Is there a link to your code that you can provide, so that we can try to troubleshoot?

@fyenne
Copy link

fyenne commented Mar 13, 2023

hi, this one it means access to streamlit that someone else has deployed,
I developed some streamlit apps so that my collegues can use it.
other elements rendered fine, only [pygwalker] not responsing correctly with regard to above error msg.
some code:

#app.py
import streamlit as st
import pandas as pd
import pygwalker as pyg
df = pd.read_csv(' ./data.csv') 
pyg.walk(df, env='Streamlit') 

then host in command line:
streamlit run app.py
the returned msg would be:

You can now view your Streamlit app in your browser.
  Local URL: http://localhost:8504
  Network URL: http://123.45.6.78:8504

on local host side :
say http://localhost:8504/
everything works fine.
on my other machine
http://123.45.6.78:8504
no return.,


plus:
I did not use pip install git+https://github.com/Kanaries/pygwalker.git@streamlit-dev
since it seems not working.
I simply pip isntall pygwalker

thank you!

@Asm-Def
Copy link
Collaborator

Asm-Def commented Mar 13, 2023

I did not use pip install git+https://github.com/Kanaries/pygwalker.git@streamlit-dev
since it seems not working.

The branch streamlit-dev has been deleted after being merged into main and released in pygwalker>=0.1.4.9.

@ysj0226
Copy link
Contributor

ysj0226 commented Mar 15, 2023

hi, this one it means access to streamlit that someone else has deployed, I developed some streamlit apps so that my collegues can use it. other elements rendered fine, only [pygwalker] not responsing correctly with regard to above error msg. some code:

#app.py
import streamlit as st
import pandas as pd
import pygwalker as pyg
df = pd.read_csv(' ./data.csv') 
pyg.walk(df, env='Streamlit') 

then host in command line: streamlit run app.py the returned msg would be:

You can now view your Streamlit app in your browser.
  Local URL: http://localhost:8504
  Network URL: http://123.45.6.78:8504

on local host side : say http://localhost:8504/ everything works fine. on my other machine http://123.45.6.78:8504 no return.,

plus: I did not use pip install git+https://github.com/Kanaries/pygwalker.git@streamlit-dev since it seems not working. I simply pip isntall pygwalker

thank you!

Hello!
I did not find similar situation after many experiments.
I first turned on streamlit on my win11 machine, and the network url got the correct data.
Then I used ec2 of aws for testing, and network url was also able to obtain data correctly.
I found some of the similar bugs you mentioned on the web, and I wonder if this is a problem caused by the configuration of streamlit or some other component.

PS:
The python version of win11 is 3.10
The python version of ec2 is 3.7

@ysj0226
Copy link
Contributor

ysj0226 commented Mar 15, 2023

@fyenne You can update the module to 0.1.6.0

@fyenne
Copy link

fyenne commented Mar 15, 2023

thanks, it works now. turns out that its just slow....
sorry for all the troubles.

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

Successfully merging a pull request may close this issue.

6 participants