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 lines4647484950515253545556575845 unmodified lines## Demo and Screenshots##### Demo Screenshot 1##### Demo Screenshot 2##### Demo Screenshot 3## Tech Stack Used45 unmodified lines4647484950515253545556575845 unmodified lines## Demo and Screenshots##### Demo Screenshot 1##### Demo Screenshot 2##### Demo Screenshot 3## Tech Stack Used
12345[theme]primaryColor="#818cf8"backgroundColor="#FFFFFF"secondaryBackgroundColor="#F0F2F6"1234[theme]primaryColor="#818cf8"backgroundColor="#FFFFFF"secondaryBackgroundColor="#F0F2F6"
1234563 unmodified lines1011121314151673 unmodified lines90919293949596979899100101102103104105106107import jsonimport requestsfrom PIL import Imageimport streamlit as stfrom Login import auth_page3 unmodified linespage_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 linescomment_placeholder = st.empty()if st.button("π€ Generate 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 sectioncomment_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(123453 unmodified lines9101112131473 unmodified lines888990919293949596979899100101102103104105106import jsonimport requestsimport streamlit as stfrom Login import auth_page3 unmodified linespage_icon="π¨βπ»",layout="wide",initial_sidebar_state="expanded",)st.markdown("## :rainbow[Welcome to Techdocs: Where Code Meets Clarity!] π")73 unmodified linescomment_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 sectioncomment_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 lines505152535455565758596061626364656649 unmodified linesst.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.")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.sidebar.divider()st.sidebar.info(49 unmodified lines50515253545556575859606162636465666768697049 unmodified linesst.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("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.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.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(
12345671 unmodified line9101112131415import streamlit as stfrom Login import auth_pagefrom PIL import Imageimport textwrapimport base641 unmodified linepage_title="Techdocs",layout="wide",page_icon="π‘",initial_sidebar_state="expanded",)@st.cache_data123451 unmodified line78910111213import streamlit as stfrom Login import auth_pageimport base641 unmodified linepage_title="Techdocs",layout="wide",page_icon="π‘",initial_sidebar_state="expanded")@st.cache_data
README.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