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

Add super simple concept #2591

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Conversation

blythed
Copy link
Collaborator

@blythed blythed commented Nov 4, 2024

May solve #2405.

@blythed blythed requested a review from jieguangzhou November 4, 2024 10:49
@blythed blythed linked an issue Nov 4, 2024 that may be closed by this pull request
6 tasks
@blythed blythed force-pushed the feature/2405-streamlit branch 9 times, most recently from 151270e to af6f62c Compare November 4, 2024 11:17
Comment on lines 17 to 22
def page(self):
"""Get the streamlit page for the multi-page app."""
import streamlit as st
return st.Page(self.demo_func, title=self.identifier, default=self.default)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The demo_func should take db, *args, **kwargs, for example

def demo_func(db **kwargs):
    model = db.load("xxx")
    # ....
def page(self):
    def page_func():
        self.demo_func(self.db)
    return st.Page(page_func, title=..., default=...)

WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes makes sense.

@blythed blythed force-pushed the feature/2405-streamlit branch 5 times, most recently from b14fd02 to 924803b Compare November 4, 2024 13:10
@blythed blythed force-pushed the feature/2405-streamlit branch from 924803b to 839897b Compare November 4, 2024 13:13
@blythed blythed merged commit cddd61f into superduper-io:main Nov 4, 2024
3 checks passed
@blythed blythed deleted the feature/2405-streamlit branch November 7, 2024 16:21
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

Successfully merging this pull request may close these issues.

[STREAMLIT] Demo interface for applications
2 participants