Spaces:
Runtime error
Runtime error
Commit Β·
409895b
1
Parent(s): a42ec60
Fixed spinner adn updated instructions
Browse filesFiles changed (11)
- README.md+3-3
- assets/results1.jpgDeleted
- assets/results1.pngAdded
- assets/results2.jpgDeleted
- assets/results2.pngAdded
- assets/results3.jpgDeleted
- assets/results3.pngAdded
- frontend/.streamlit/config.toml-1
- frontend/pages/Code.py+13-14
- frontend/pages/Usage.py+12-8
- frontend/π‘_Home.py+1-3
45 unmodified lines4647484949505152525354555556575845 unmodified lines
## Demo and Screenshots##### Demo Screenshot 1
##### Demo Screenshot 2
##### Demo Screenshot 3
## Tech Stack Used12234[theme]
primaryColor="#818cf8"backgroundColor="#FFFFFF"secondaryBackgroundColor="#F0F2F6"1233453 unmodified lines910111312131473 unmodified lines88899091939495969798991001011021031049293949596979899100101102103104105106import jsonimport requestsfrom PIL import Image
import streamlit as stfrom Login import auth_page3 unmodified lines page_icon="π¨βπ»", layout="wide", initial_sidebar_state="expanded", menu_items={"About": "Built by @HemanthSai7 and @MayureshAgashe2107 with Streamlit"},)
st.markdown("## :rainbow[Welcome to Techdocs: Where Code Meets Clarity!] π")73 unmodified lines comment_placeholder = st.empty()
if st.button("π€ Generate Documentation"): with st.spinner("Generating Documentation..."): if code_input: headers['Authorization'] = f"Bearer {st.session_state.access_token}" response = query_post(base_url + '/api/inference', headers=headers, data=json.dumps({'code_block':code_input, 'api_key':API_KEY})) docstr = response.json()["docstr"] comment_placeholder.subheader("Generated Documentation:") comment_placeholder.markdown(f"<pre><code>{docstr}</code></pre>", unsafe_allow_html=True) # Scroll to the comment section comment_placeholder.empty() comment_placeholder.markdown(f"<pre><code>{docstr}</code></pre>", unsafe_allow_html=True) else: st.warning("Please enter some code.") if code_input: headers['Authorization'] = f"Bearer {st.session_state.access_token}" response = query_post(base_url + '/api/inference', headers=headers, data=json.dumps({'code_block':code_input, 'api_key':API_KEY})) docstr = response.json()["docstr"] comment_placeholder.subheader("Generated Documentation:") comment_placeholder.markdown(f"<pre><code>{docstr}</code></pre>", unsafe_allow_html=True) # Scroll to the comment section comment_placeholder.empty() comment_placeholder.markdown(f"<pre><code>{docstr}</code></pre>", unsafe_allow_html=True) else: st.warning("Please enter some code.")
st.sidebar.divider()st.sidebar.info(49 unmodified lines505152535354555657585657585960616263606162636465666768697049 unmodified lines
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.") st.warning("To start using the CLI, please generate an API Key from the Streamlit app. You can also generate the API Key from the CLI.")
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.write("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.write("2. Install Techdocs via pip:"); st.code("pip install techdocs","python") st.write("3. CD into your project directory.") st.code("CD <YOUR-PROJECT-DIRECTORY>","bash")
with st.expander("π CLI and Working", expanded=True): st.write("1. Once the installation is complete, type **techdocs** in the terminal. You should be able to see info about our CLI.") st.write("2. You can login into our Techdocs app using the CLI or create an account if you don't have one. To signup, type the following command in the terminal:") 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.") st.code("techdocs signup -u <username> -p <password> -e <email>", "bash") st.write("3. Generate an API Key from the Code page and paste it in the command below.") st.code("techdocs generate -k <API_KEY> -u <USERNAME> -p <PASSWORD> -d <ROOT-DIRECTORY-OF-THE-PROJECT>","bash") st.write("4. Wait for the documentation to be generated. You can view the status of the documentation generation in the CLI.")
st.sidebar.divider()st.sidebar.info(12343451 unmodified line7891210111213import streamlit as stfrom Login import auth_pagefrom PIL import Image import textwrap
import base64
1 unmodified line page_title="Techdocs", layout="wide", page_icon="π‘", initial_sidebar_state="expanded", initial_sidebar_state="expanded")
@st.cache_dataREADME.md+3-3
assets/results1.jpgDeleted

Large File Pointer Details
- SHA256: 9d5b6fbbaaf3ba9eb6dc9dd37e23d3b9329b412a9856ca0ff0e0d9bd4ae98dba
- Pointer size: 131 Bytes
- Size of remote file: 114 kB
assets/results1.pngAdded

assets/results2.jpgDeleted

Large File Pointer Details
- SHA256: c1497fd6f3c9f9bd0bd59606ee29326bf26ae60f93073b10ea2c5329f1fdf50f
- Pointer size: 130 Bytes
- Size of remote file: 91.4 kB
assets/results2.pngAdded

assets/results3.jpgDeleted

Large File Pointer Details
- SHA256: 50b078bfaead6b2d7c53ce981303b41f0f7f115e7b2868239b6d6045bc16d861
- Pointer size: 130 Bytes
- Size of remote file: 82.8 kB
assets/results3.pngAdded

frontend/.streamlit/config.toml-1
frontend/pages/Code.py+13-14
frontend/pages/Usage.py+12-8
frontend/π‘_Home.py+1-3