Spaces:
Runtime error
Runtime error
import streamlit as st | |
st.title("β¨οΈ Codebase") | |
st.markdown("<h5>I handled the backend api calling using fastapi. All the files that are used to prepare and maintain the chatbot can be found <a href='https://github.com/Neloy-Barman/IPL-Chatbot/tree/backend'>here</a>. I'm adding a short description of all the files and folders.</h5>", unsafe_allow_html=True) | |
st.markdown("<h4>π main.py</h4>", unsafe_allow_html=True) | |
st.write("This is the main .py file from where the backend handling starts.") | |
st.markdown("<h4>π generic_helpers.py</h4>", unsafe_allow_html=True) | |
st.write("There are some values, dictionaries and methods that are used in many files. So, all of them are placed here and those are imported from this file.") | |
st.markdown("<h4>π config.py</h4>", unsafe_allow_html=True) | |
st.write("As the conversation progresses, some parameters are to be stored, that are needed to fetch final data. These are saved in a dictionary with the session id as the key. ") | |
st.markdown("<h4>π db_helpers</h4>", unsafe_allow_html=True) | |
st.write("All these *.py files within this folder are used to fetch data from the database server. Different files contain methods that read from the database and returns relatable data needed.") | |
db_helpers_desc = """ | |
<table align="center"> | |
<tr align="center"> | |
<th>File Name</th> | |
<th>Fetch Handling to database</th> | |
</tr> | |
<tr align="center"> | |
<td>db_connection</td> | |
<td>Creates and close connection to the database.</td> | |
</tr> | |
<tr align="center"> | |
<td>dates_db</td> | |
<td>Particular session start date and end date.</td> | |
</tr> | |
<tr align="center"> | |
<td>match_db</td> | |
<td>toss decision, winning runs, winning wickets, match result type and dls method.</td> | |
</tr> | |
<tr align="center"> | |
<td>player_of_the_match_db</td> | |
<td>player of the match.</td> | |
</tr> | |
<tr align="center"> | |
<td>seasons_db</td> | |
<td>available unique sessions.</td> | |
</tr> | |
<tr align="center"> | |
<td>teams_db</td> | |
<td>both teams, match winner and toss winner teams.</td> | |
</tr> | |
<tr align="center"> | |
<td>umpires_db</td> | |
<td>first umpire, second umpire and both umpires.</td> | |
</tr> | |
<tr align="center"> | |
<td>venues_db</td> | |
<td>venues for the particular session and date.</td> | |
</tr> | |
</table> | |
""" | |
st.markdown(db_helpers_desc, unsafe_allow_html=True) | |
st.markdown("<h4>π intent_helpers</h4>", unsafe_allow_html=True) | |
st.write("*.py Files here are used to handling data fetching and generating responses of the chatbot based on particular intent.") | |
db_helpers_desc = """ | |
<table align="center"> | |
<tr align="center"> | |
<th>File Name</th> | |
<th>Backend handling for intent</th> | |
</tr> | |
<tr align="center"> | |
<td>date_helper</td> | |
<td>Date</td> | |
</tr> | |
<tr align="center"> | |
<td>match_info_helper</td> | |
<td>Match Info and Match Info Next.</td> | |
</tr> | |
<tr align="center"> | |
<td>player_of_the_match_helper</td> | |
<td>Player of the Match.</td> | |
</tr> | |
<tr align="center"> | |
<td>season_helper</td> | |
<td>Season.</td> | |
</tr> | |
<tr align="center"> | |
<td>team_info_helper</td> | |
<td>Team Info and Team Info Next.</td> | |
</tr> | |
<tr align="center"> | |
<td>umpire_info_helper</td> | |
<td>Umire Info and Umpire Info Next.</td> | |
</tr> | |
<tr align="center"> | |
<td>venues_helper</td> | |
<td>Venue.</td> | |
</tr> | |
</table> | |
""" | |
st.markdown(db_helpers_desc, unsafe_allow_html=True) | |
st.markdown("<h4>π requirements.txt</h4>", unsafe_allow_html=True) | |
st.write("It contains information of all the dependencies with their particular versions installed and used to create and maintain the app.") | |
st.markdown("<h4>π .gitignore</h4>", unsafe_allow_html=True) | |
st.write("It has all the file patterns that needs to be ignored while pushing to the github.") |