-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add dashboard support #17
Conversation
…ository Signed-off-by: Onuralp SEZER <[email protected]>
Minimal how to run via "python file" import sys
import streamlit.web.cli as stcli
def run_streamlit_app():
sys.argv = ["streamlit", "run", "dash.py"]
stcli.main()
if __name__ == "__main__":
run_streamlit_app() This works fine and I also did some changes sending very soon too ( I just wanted to share info quicker ) |
chore(gitignore): 🧹 update gitignore and clean up egg folder from repository
Hmm.. would this work if I want to initialize the the state with the explorer object like I'm doing in this PR? |
That is what I am testing too. but should be "defined" |
Okay 👍 let me know if it works for you |
I was able to run but you were right It does undefine keys, I need to either move or I need to pull some trick based on this https://docs.streamlit.io/library/get-started/multipage-apps (If you okay with it) I will have multiple app run but just one page |
@onuralpszr did you get it working? |
UI yes but I need keys and datas |
As long as it doesn't interfere with user directly, I think it should be fine. Let's just get it working and then try to refine it.. |
This is also why I was a bit skeptical about using dashboards. Maybe in the long run the best thing would be to build our own dashboard from scratch using react/js |
@AyushExel should we continue working on dashboard or some other issue? |
It really depends on whether it works. @onuralpszr is trying to get it working. If it works we can continue with it for a while. |
@AyushExel Why don't we initialize state in runtime? In that way, we can use same app for another session. User does not have stop and restart session. What do you think? start dash without explorer
allow user to chose required option to initialize `explorer`
DO FURTHER |
@AyushExel @onuralpszr It is natural that you can not pass state objects without creating app. I analyzed the code from |
I was already aware that but problem is "not" what you said. Problem is when we use "cli" tricks I had to create new "process" which means "ANYTHING" we create in current process will be not accessible. So for that reason I am trying to change that behaviour via creating multi page or if it is too hacky, I am also considering to change to something else as well. |
We do that too but same reason what I wrote above also cancel that variable too |
Solution-1 (Not recommended): Solution-2: |
Not sure. I'd prefer to keep the experience intuitive. Maybe there's a way, I'm not sure. |
@onuralpszr @hardikdava okay guys if this blocker isn't resolved, I think the way forward would be to build a js dashboard form scratch :( |
I had a irl (workday) i will look before close but if you want to go js/ts sure |
@onuralpszr ohh okay. Let me know if you make some progress. I'm also trying something hacky, but if I can't get it working before going to bed, I'll probably try js from tomorrow |
Consider gradio and others before go js we have other good options too |
Gradio might have the same problem related to state management. It's for simple input - output experiences I'd say not multi stage apps. But yes plotly dash might be an alternative.. |
@onuralpszr @hardikdava ok guys, I think I made some progress. Now the problem is that streamlit accepts custom cmd line args like this
I think if this issue is solved we'll have a working solution |
@AyushExel I just tested the update. It is throwing the error you mentioned about |
|
https://pypi.org/project/streamlit-dash/ For demo test https://github.com/onuralpszr/streamlit-dash/blob/main/demo/streamlit_app.py I change lib name so be aware that too. |
Perfect. I'll try it in an hour |
Awesome let me know how is it goes. |
@AyushExel I guess it works ? (since you sent a push ? ) |
Oh yeahh. I was building other things on top of it like query and search.. that is also done |
Awesome :) I am glad it work but we gonna replace once original repo people merge that feature right ? |
@onuralpszr nah I think let's keep developing our version and add new features when needed. We can't reply on folks merging changes forever |
okay I am breaking fork and change name and readme for avoid confusion for name conflicts |
Signed-off-by: Onuralp SEZER <[email protected]>
Signed-off-by: Onuralp SEZER <[email protected]>
Signed-off-by: Onuralp SEZER <[email protected]>
@hardikdava @onuralpszr this is how I want to implement it. the user can launch the dashboard by running
exp.dash
The cli launch script seems to be broken in some streamlit update.
streamlit.cli
moved tostreamlit.web.cli
but even on updating that it doesn't work so maybe the API has changed more than just the name. Can you guys think of another way to make this work?