Skip to content

Commit

Permalink
Merge pull request #22 from HemanthSai7/main
Browse files Browse the repository at this point in the history
Streamlit frontend
  • Loading branch information
HemanthSai7 authored Sep 30, 2023
2 parents dc2d719 + 3eb8b4f commit 5ea37fb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 36 deletions.
7 changes: 4 additions & 3 deletions frontend/pages/Code.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ def instructions():
##### 2. Paste the `API Key` in the field provided.
##### 3. Paste your code function in the input code box.
##### 3. Paste your `code function` in the input code box.
##### 4. Click on the `Generate Documentation` 🤖 button to generate the documentation.
##### 5. The generated documentation will be displayed in the section below.
##### 5. The `generated documentation` will be displayed in the section below.
"""
)
)
st.info("Please note that the Streamlit app is just a preview to give the user an idea of the project. To witness the full power of Techdocs, please use the CLI. The instructions to use the CLI are listed in Usage page")


with st.sidebar:
Expand Down
37 changes: 7 additions & 30 deletions frontend/pages/Usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,42 +46,19 @@ def usage():
st.write(f'<p style="font-size:20px; color:#9c9d9f ">{intro_text}</p>', unsafe_allow_html=True)
st.write(f'<p style="color:#9c9d9f; font-size:20px">{text}</p>', unsafe_allow_html=True)

st.markdown("### 📝 Using Techdocs via the CLI")
st.markdown("### 📝 :rainbow[Using Techdocs via the CLI]")
st.info("Please use the CLI to generate the documentation for your project. The Streamlit app is just a preview to give the user an idea of the project.")
st.warning("The API Key can only be generated from the Techdocs Streamlit app. To start using the CLI, please generate an API Key from the Streamlit app.")

with st.expander("⚙️ Installation and setup",expanded=True):
st.text("1. Create a virtual environment. We recommend using conda but you can python's venv as well:"); st.code("conda create -n techdocs python=3.11","python")
st.text("2. Install Techdocs via pip:"); st.code("pip install techdocs","python")
st.text("3. CD into your project directory.")
st.code("CD <YOUR-PROJECT-DIRECTORY>","bash")
st.text("""
4. Login into our Techdocs Streamlit app or signup if you don't have an account.
5. Generate an API Key from the Techdocs Streamlit app and paste it in the command below.
""")
st.code("techdocs -k <API_KEY> -u <USERNAME> -p <PASSWORD> -d <ROOT-DIRECTORY-OF-THE -PROJECT","bash")
st.text("6. Wait for the documentation to be generated. You can view the status of the documentation generation in the CLI.")

st.divider()
st.markdown("### 📝 Using Techdocs via the Streamlit")

with st.expander("📝Instructions",expanded=True):
st.markdown(
"""
##### 1. Head over to the Code Page.
##### 2. Generate an `API Key` from the sidebar to get started.
##### 3. Paste the `API Key` in the field provided.
##### 4. Paste your code function in the input code box.
##### 5. Click on the `Generate Documentation`🤖 button to generate the documentation.
##### 6. The generated documentation will be displayed in the section below.
"""
)

st.text("4. Login into our Techdocs Streamlit app or signup if you don't have an account.")
st.text("5. Generate an API Key from the Code page and paste it in the command below.")
st.code("techdocs -k <API_KEY> -u <USERNAME> -p <PASSWORD> -d <ROOT-DIRECTORY-OF-THE -PROJECT>","bash")
st.text("6. Wait for the documentation to be generated. You can view the status of the documentation generation in the CLI.")


if 'access_token' not in st.session_state:
Expand Down
5 changes: 2 additions & 3 deletions frontend/🏡_Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ def set_page_background(png_file):
)

st.markdown("""
## :rainbow[How to use Techdocs?]
##### Head over to the **Usage** page to get started!😄
## :rainbow[Ready to use Techdocs?]
##### Head over to the `Usage page` to get started!😄
""")
st.link_button("Usage", "http://localhost:8501/Usage_📝?page=Usage")

st.sidebar.divider()
st.sidebar.info(
Expand Down

0 comments on commit 5ea37fb

Please sign in to comment.