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

Wraps code with Streamlit #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Eve-ning
Copy link

Hello Nqinn,

I've wrapped your code to work with Streamlit.

  • Streamlit is a web-based data application sharing platform. i.e. deploy your Python code on the browser. I've been using it for a few years now, I think this can benefit from it.
  • The process to deploy is simple

What needs to change

  1. You need to change your python code to work with streamlit, which I've done here. Note that streamlit mainly cares about UI/UX, so I only needed to change the input st.number_input and st.text
  2. You need to sign up to streamlit and deploy it from here. It's free btw. Also unless you're doing high computational loads on it (like AI/ML), you're well within the free tier limits.

Deploying to Streamlit

Go to https://share.streamlit.io/

Create new App

image

Select the Application & Deploy

image

Redeploying

Streamlit cloud automatically detects any change on the github repo, so you need need to push changes to update it.
However, it's best to develop small changes locally, see below.

Developing locally

Note that streamlit cloud has the default packages installed to make the app work.
Thus you need to install those too

pip install streamlit

This will install all dependencies to run streamlit locally.

Then, run your app via

streamlit run path/to/my.app

Which will host the server locally

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501

Now, you can develop your Streamlit app without having to deploy on streamlit.

Note to re-run automatically if you want with the top right button
image

Comment on lines +8 to +9
etterna_recep = st.number_input('\nPlease input your Etterna Receptor Size: ',
min_value=1, max_value=10000, step=10)
Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure what's the min max values for Receptor Size, will need your input for this

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.

1 participant