Spaces:
Runtime error
Runtime error
nelbarman053
commited on
Commit
Β·
8c8810c
1
Parent(s):
366fcb3
Codebase and and some icons added
Browse files- pages/Codebase.py +118 -0
- pages/Conversation_Flow_Diagrams.py +5 -5
pages/Codebase.py
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
st.title("β¨οΈ Codebase")
|
6 |
+
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)
|
7 |
+
|
8 |
+
|
9 |
+
st.markdown("<h4>π main.py</h4>", unsafe_allow_html=True)
|
10 |
+
st.write("This is the main .py file from where the backend handling starts.")
|
11 |
+
|
12 |
+
|
13 |
+
st.markdown("<h4>π generic_helpers.py</h4>", unsafe_allow_html=True)
|
14 |
+
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.")
|
15 |
+
|
16 |
+
|
17 |
+
st.markdown("<h4>π config.py</h4>", unsafe_allow_html=True)
|
18 |
+
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. ")
|
19 |
+
|
20 |
+
|
21 |
+
st.markdown("<h4>π db_helpers</h4>", unsafe_allow_html=True)
|
22 |
+
|
23 |
+
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.")
|
24 |
+
|
25 |
+
db_helpers_desc = """
|
26 |
+
<table align="center">
|
27 |
+
<tr align="center">
|
28 |
+
<th>File Name</th>
|
29 |
+
<th>Fetch Handling to database</th>
|
30 |
+
</tr>
|
31 |
+
<tr align="center">
|
32 |
+
<td>db_connection</td>
|
33 |
+
<td>Creates and close connection to the database.</td>
|
34 |
+
</tr>
|
35 |
+
<tr align="center">
|
36 |
+
<td>dates_db</td>
|
37 |
+
<td>Particular session start date and end date.</td>
|
38 |
+
</tr>
|
39 |
+
<tr align="center">
|
40 |
+
<td>match_db</td>
|
41 |
+
<td>toss decision, winning runs, winning wickets, match result type and dls method.</td>
|
42 |
+
</tr>
|
43 |
+
<tr align="center">
|
44 |
+
<td>player_of_the_match_db</td>
|
45 |
+
<td>player of the match.</td>
|
46 |
+
</tr>
|
47 |
+
<tr align="center">
|
48 |
+
<td>seasons_db</td>
|
49 |
+
<td>available unique sessions.</td>
|
50 |
+
</tr>
|
51 |
+
<tr align="center">
|
52 |
+
<td>teams_db</td>
|
53 |
+
<td>both teams, match winner and toss winner teams.</td>
|
54 |
+
</tr>
|
55 |
+
<tr align="center">
|
56 |
+
<td>umpires_db</td>
|
57 |
+
<td>first umpire, second umpire and both umpires.</td>
|
58 |
+
</tr>
|
59 |
+
<tr align="center">
|
60 |
+
<td>venues_db</td>
|
61 |
+
<td>venues for the particular session and date.</td>
|
62 |
+
</tr>
|
63 |
+
</table>
|
64 |
+
"""
|
65 |
+
|
66 |
+
st.markdown(db_helpers_desc, unsafe_allow_html=True)
|
67 |
+
|
68 |
+
|
69 |
+
st.markdown("<h4>π intent_helpers</h4>", unsafe_allow_html=True)
|
70 |
+
|
71 |
+
st.write("*.py Files here are used to handling data fetching and generating responses of the chatbot based on particular intent.")
|
72 |
+
|
73 |
+
db_helpers_desc = """
|
74 |
+
<table align="center">
|
75 |
+
<tr align="center">
|
76 |
+
<th>File Name</th>
|
77 |
+
<th>Backend handling for intent</th>
|
78 |
+
</tr>
|
79 |
+
<tr align="center">
|
80 |
+
<td>date_helper</td>
|
81 |
+
<td>Date</td>
|
82 |
+
</tr>
|
83 |
+
<tr align="center">
|
84 |
+
<td>match_info_helper</td>
|
85 |
+
<td>Match Info and Match Info Next.</td>
|
86 |
+
</tr>
|
87 |
+
<tr align="center">
|
88 |
+
<td>player_of_the_match_helper</td>
|
89 |
+
<td>Player of the Match.</td>
|
90 |
+
</tr>
|
91 |
+
<tr align="center">
|
92 |
+
<td>season_helper</td>
|
93 |
+
<td>Season.</td>
|
94 |
+
</tr>
|
95 |
+
<tr align="center">
|
96 |
+
<td>team_info_helper</td>
|
97 |
+
<td>Team Info and Team Info Next.</td>
|
98 |
+
</tr>
|
99 |
+
<tr align="center">
|
100 |
+
<td>umpire_info_helper</td>
|
101 |
+
<td>Umire Info and Umpire Info Next.</td>
|
102 |
+
</tr>
|
103 |
+
<tr align="center">
|
104 |
+
<td>venues_helper</td>
|
105 |
+
<td>Venue.</td>
|
106 |
+
</tr>
|
107 |
+
</table>
|
108 |
+
"""
|
109 |
+
|
110 |
+
st.markdown(db_helpers_desc, unsafe_allow_html=True)
|
111 |
+
|
112 |
+
|
113 |
+
st.markdown("<h4>π requirements.txt</h4>", unsafe_allow_html=True)
|
114 |
+
st.write("It contains information of all the dependencies with their particular versions installed and used to create and maintain the app.")
|
115 |
+
|
116 |
+
|
117 |
+
st.markdown("<h4>π .gitignore</h4>", unsafe_allow_html=True)
|
118 |
+
st.write("It has all the file patterns that needs to be ignored while pushing to the github.")
|
pages/Conversation_Flow_Diagrams.py
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
st.title("Conversation Flow Diagrams")
|
4 |
|
5 |
# Team Info
|
6 |
-
st.header("Team Info")
|
7 |
st.image("assets/team_info.png")
|
8 |
|
9 |
# Match Info
|
10 |
-
st.header("Match Info")
|
11 |
st.image("assets/match_info.png")
|
12 |
|
13 |
# Umpire Info
|
14 |
-
st.header("Umpire Info")
|
15 |
st.image("assets/umpire_info.png")
|
16 |
|
17 |
# Player of the match
|
18 |
-
st.header("Player of the match")
|
19 |
st.image("assets/player_of_the_match.png")
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
st.title("ποΈ Conversation Flow Diagrams")
|
4 |
|
5 |
# Team Info
|
6 |
+
st.header("π Team Info")
|
7 |
st.image("assets/team_info.png")
|
8 |
|
9 |
# Match Info
|
10 |
+
st.header("π Match Info")
|
11 |
st.image("assets/match_info.png")
|
12 |
|
13 |
# Umpire Info
|
14 |
+
st.header("π Umpire Info")
|
15 |
st.image("assets/umpire_info.png")
|
16 |
|
17 |
# Player of the match
|
18 |
+
st.header("π Player of the match")
|
19 |
st.image("assets/player_of_the_match.png")
|