Aditya Patkar commited on
Commit
1a04e30
1 Parent(s): 788ba6c

Code cleanup

Browse files
Files changed (1) hide show
  1. app.py +15 -12
app.py CHANGED
@@ -13,6 +13,9 @@ if 'fixer_conversation' not in st.session_state:
13
  st.session_state['fixer_conversation'] = fixer_conversation
14
 
15
  def message_writer(input_text, response):
 
 
 
16
  messages = []
17
  current_message = ""
18
  current_is_user = True
@@ -70,16 +73,16 @@ def main():
70
  st.markdown("---")
71
 
72
  elif page == "Job Description Generator":
73
- c1 = st.container()
74
- c1.title("A Job Description Generating Chatbot")
75
- c1.markdown(
76
  "JobGPT is a chatbot that generates job descriptions. \
77
  This is built just for demo purpose."
78
  )
79
- input_text = c1.text_input(
80
  "Prompt",
81
  "Hi, can you please help me generate an unbiased job description?")
82
- button = c1.button("Send")
83
 
84
  st.sidebar.markdown("---")
85
  st.sidebar.markdown("Click on `new chat` to start a new chat. \
@@ -89,7 +92,7 @@ def main():
89
 
90
  if clear_session:
91
  st.session_state['generator_conversation'] = conversation
92
- c1.markdown("---")
93
 
94
  initial_message = "Hello, how can I help you?"
95
  message(initial_message)
@@ -99,15 +102,15 @@ def main():
99
  st.session_state['generator_conversation'])
100
  message_writer(input_text, response)
101
  elif page == "Job Description Fixer":
102
- c2 = st.container()
103
- c2.title("JobGPT: A Job Description Fixing Chatbot")
104
- c2.markdown(
105
  "JobGPT is a chatbot that fixes job descriptions. This is built just for demo purpose."
106
  )
107
- input_text = c2.text_area(
108
  "Prompt",
109
  "Hi, can you please help me fix my job description? It's biased.")
110
- button = c2.button("Send")
111
 
112
  st.sidebar.markdown("---")
113
  st.sidebar.markdown("Click on `new chat` to start a new chat. \
@@ -117,7 +120,7 @@ def main():
117
 
118
  if clear_session:
119
  st.session_state['fixer_conversation'] = fixer_conversation
120
- c2.markdown("---")
121
 
122
  initial_message = "Hello, how can I help you?"
123
  message(initial_message)
 
13
  st.session_state['fixer_conversation'] = fixer_conversation
14
 
15
  def message_writer(input_text, response):
16
+ '''
17
+ Writes the messages to the chat window.
18
+ '''
19
  messages = []
20
  current_message = ""
21
  current_is_user = True
 
73
  st.markdown("---")
74
 
75
  elif page == "Job Description Generator":
76
+ container_one = st.container()
77
+ container_one.title("A Job Description Generating Chatbot")
78
+ container_one.markdown(
79
  "JobGPT is a chatbot that generates job descriptions. \
80
  This is built just for demo purpose."
81
  )
82
+ input_text = container_one.text_input(
83
  "Prompt",
84
  "Hi, can you please help me generate an unbiased job description?")
85
+ button = container_one.button("Send")
86
 
87
  st.sidebar.markdown("---")
88
  st.sidebar.markdown("Click on `new chat` to start a new chat. \
 
92
 
93
  if clear_session:
94
  st.session_state['generator_conversation'] = conversation
95
+ container_one.markdown("---")
96
 
97
  initial_message = "Hello, how can I help you?"
98
  message(initial_message)
 
102
  st.session_state['generator_conversation'])
103
  message_writer(input_text, response)
104
  elif page == "Job Description Fixer":
105
+ container_two = st.container()
106
+ container_two.title("JobGPT: A Job Description Fixing Chatbot")
107
+ container_two.markdown(
108
  "JobGPT is a chatbot that fixes job descriptions. This is built just for demo purpose."
109
  )
110
+ input_text = container_two.text_area(
111
  "Prompt",
112
  "Hi, can you please help me fix my job description? It's biased.")
113
+ button = container_two.button("Send")
114
 
115
  st.sidebar.markdown("---")
116
  st.sidebar.markdown("Click on `new chat` to start a new chat. \
 
120
 
121
  if clear_session:
122
  st.session_state['fixer_conversation'] = fixer_conversation
123
+ container_two.markdown("---")
124
 
125
  initial_message = "Hello, how can I help you?"
126
  message(initial_message)