Spaces:
Sleeping
Sleeping
File size: 2,605 Bytes
4096d6d b66e25a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
import streamlit as st
st.set_page_config(
page_title="Hello",
page_icon="👋",
)
st.sidebar.success("Select a Page")
st.title('Getting Setup for Streamlit Spaces')
st.markdown("""
## Step 1: Install what you need for this notebook
It is recommended you install into a conda environment:
```
conda create -n DataVizClass python=3.10
conda activate DataVizClass
```
Then you can install the correct packages.
```
pip install streamlit==1.39.0 altair numpy pandas matplotlib
```
To work with the VSCode interface, be sure that `jupyter` is also installed:
```
pip install jupyter
```
Or you can install with `conda`.
Note that the package [Streamlit](https://streamlit.io/) that we will be working with requires we use Python scripts, so JupyterLab and/or Jupyter Notebooks won't work for this process. """)
st.markdown("""
## Step 2: Clone the App files -- Option 1 (HuggingFace)
""")
st.markdown("""
### Step 2.1: Duplicate the HuggingFace App
""")
st.markdown("""
If you want to be able to deploy your own app on your own HuggingFace account,
you first need to duplicate this space.
To duplicate, right click on the 3 dots to the left of your profile icon: """)
st.image("images/duplicateSpace_p1.png")
st.markdown("""
Make sure your user name is selected, and it is set to `Public` for visibility. Name the space whatever you want:
""")
st.image("images/duplicateSpace_p2.png")
st.markdown("""
### Step 2.2: Clone *your duplicated* Space
""")
st.markdown("""
First, be sure that `git-lfs` is installed, and then clone *your* duplicated space repo.
You can find instructions for this by once again right-clicking the 3 dots and clicking on "Clone Repository":
""")
st.image("images/clone_the_repo.png")
st.markdown("""
Then you will be given this set of instructions (note your repo name will be different!):
""")
st.image("images/gitclone_hf.png")
st.markdown("""
""")
st.markdown("""
Now you should have a repository folder on your local computer that has your repo name and the files for this app.
""")
st.markdown("""
## Step 2: Clone the App files -- Option 2 (GitHub)
""")
st.markdown("""
If you don't want to mess around with HuggingFace and just want to play around with Streamlit locally,
you can also download these files from GitHub by [cloning this repository right here](https://github.com/jnaiman/shadisClassApp).
For info about using git commands to clone a repository, [see this link right here](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
""") |