File size: 3,731 Bytes
0392324
 
 
44df0dd
0392324
 
 
 
2ecc792
0392324
 
 
 
 
 
 
 
 
 
 
58a91e1
0392324
 
 
 
 
 
58a91e1
0392324
58a91e1
0392324
58a91e1
 
0392324
58a91e1
0392324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
892f3cb
0392324
 
 
 
58a91e1
892f3cb
58a91e1
892f3cb
 
 
58a91e1
 
0392324
58a91e1
 
 
 
 
 
 
 
 
 
0392324
58a91e1
 
 
 
 
0392324
58a91e1
9c405cd
 
58a91e1
0392324
 
4d6db52
 
 
 
 
 
 
 
 
0392324
58a91e1
0392324
 
 
 
 
 
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import streamlit as st
from Login import auth_page
from PIL import Image 
import textwrap

import base64

st.set_page_config(
    page_title="Techdocs",
    layout="wide",
    page_icon="๐Ÿก",
    initial_sidebar_state="expanded",
)

@st.cache_data
def get_base64_bin_file(bin_file):
    with open(bin_file, 'rb') as f:
        data = f.read()
    return base64.b64encode(data).decode()

st.markdown("## :rainbow[Welcome to Techdocs: Where Code Meets Clarity!]๐Ÿš€")

def logout():
    del st.session_state["access_token"]
    del st.session_state["refresh_token"]
    del st.session_state["username"]

with st.sidebar.expander("๐Ÿง‘Account Details",expanded=True):
    if 'username' not in st.session_state:
        st.warning("Please Login or Signup to continue")
    else:
        st.info(f"Welcome, {st.session_state.username}! ๐Ÿ˜„")
        if st.button("Logout ๐Ÿ‘‹"):
            logout()
            st.rerun()


def home_page():


    def set_page_background(png_file):
        bin_str = get_base64_bin_file(png_file)
        page_bg_img = f'''
            <style>
            .stApp {{
                background-image: url("data:image/jpg;base64,{bin_str}");
                background-size: cover;
                background-repeat: no-repeat;
                background-attachment: scroll;
            }}
            </style>
        '''
        st.markdown(page_bg_img, unsafe_allow_html=True)

    # set_page_background("../assets/bg.jpg") 

    st.markdown(
        """

    ##### Unleash the documentation dynamo that is **Techdocs**! Say goodbye to the documentation drudgery that haunts coders' dreams and embrace the effortless power of AI-driven documentation. With **Techdocs**, harness the genius of LLama2, the magic of WizardCoderLM, the versatility of Huggingface Transformers, and the precision of Langchain and Clarifai.

    ## :rainbow[How Does Techdocs Work Its Magic?] ๐Ÿ”ฎ

    ##### Just feed your code into **Techdocs**, and like a seasoned wizard, it'll conjure up beautifully detailed documentation in an instant. Your code will transform into a masterpiece of clarity, complete with insightful comments, vivid descriptions, crystal-clear parameters, return values, and real-world examples.

    """
    )

    with st.expander("What Can Techdocs Do for You? ๐ŸŒŸ",expanded=True):
        st.markdown(
            """
        - ##### Boost your code quality effortlessly ๐Ÿš€.
        - ##### Share your brilliance with the world in a snap ๐ŸŒ.
        - ##### Effortlessly generate documentation for your code ๐Ÿค–.
        - ##### Include comments, descriptions, parameters, return values, and real-life examples ๐Ÿ“ƒ.
        - ##### Elevate your code's readability, maintainability, and quality ๐Ÿ“ƒ.
        """
        )

    st.markdown(
        """
        ##### **Techdocs** is your code's trusty companion, helping you document with ease so you can focus on what you do best: coding!. **Techdocs** is your secret weapon for leveling up your code game. Whether you're a seasoned developer or just starting your coding journey, Techdocs has got your back. Get ready to unlock the future of code documentation today! ๐ŸŒŸ
        """
    )

    st.markdown("""
                ## :rainbow[Ready to use Techdocs?]
                ##### Head over to the `Usage page` to get started!๐Ÿ˜„
                """)


st.sidebar.divider()
st.sidebar.info(
    """
    Follow us on:

    Github โ†’ [@mayureshagashe2105](https://github.com/MayureshAgashe2105)\n
    Github โ†’ [@HemanthSai7](https://github.com/HemanthSai7)
    """
)


if 'access_token' not in st.session_state:
    st.session_state.runpage = auth_page
else:
    st.session_state.runpage = home_page
st.session_state.runpage()