StevesInfinityDrive commited on
Commit
2c5bd51
·
verified ·
1 Parent(s): 1e4eec0

Update src/chatbot.py

Browse files
Files changed (1) hide show
  1. src/chatbot.py +11 -6
src/chatbot.py CHANGED
@@ -278,7 +278,7 @@ def chatbot_conversation(country_selection: str):
278
  print("(Feedback saved.)")
279
 
280
  ########################################
281
- # 7. TKINTER COUNTRY SELECTION
282
  ########################################
283
  def main():
284
  """
@@ -286,10 +286,15 @@ def main():
286
  then launch the console chatbot with the chosen country.
287
  """
288
  root = tk.Tk()
289
- root.title("Country Selection")
290
 
291
- label = tk.Label(root, text="Select your country for localized helpline info:")
292
- label.pack(padx=20, pady=10)
 
 
 
 
 
293
 
294
  # Create drop-down using the keys from COUNTRY_HELPLINES
295
  countries = list(COUNTRY_HELPLINES.keys())
@@ -302,11 +307,11 @@ def main():
302
  root.destroy() # Close the GUI window
303
  chatbot_conversation(selected_country) # Start the console chatbot
304
 
305
- button = tk.Button(root, text="OK", command=on_select)
306
  button.pack(pady=10)
307
 
308
  root.mainloop()
309
 
310
  # Run the Tkinter-based country selection when this script is called directly
311
  if __name__ == "__main__":
312
- main()
 
278
  print("(Feedback saved.)")
279
 
280
  ########################################
281
+ # 7. TKINTER GUI WITH COUNTRY SELECTION
282
  ########################################
283
  def main():
284
  """
 
286
  then launch the console chatbot with the chosen country.
287
  """
288
  root = tk.Tk()
289
+ root.title("Mental Health Chatbot Prototype")
290
 
291
+ # Disclaimer message
292
+ disclaimer_label = tk.Label(root, text="Disclaimer: This is just a prototype and not a substitute for professional help.", fg="red")
293
+ disclaimer_label.pack(padx=20, pady=10)
294
+
295
+ # Country selection label
296
+ country_label = tk.Label(root, text="Select your country for localized helpline info:")
297
+ country_label.pack(padx=20, pady=10)
298
 
299
  # Create drop-down using the keys from COUNTRY_HELPLINES
300
  countries = list(COUNTRY_HELPLINES.keys())
 
307
  root.destroy() # Close the GUI window
308
  chatbot_conversation(selected_country) # Start the console chatbot
309
 
310
+ button = tk.Button(root, text="Start Chat", command=on_select)
311
  button.pack(pady=10)
312
 
313
  root.mainloop()
314
 
315
  # Run the Tkinter-based country selection when this script is called directly
316
  if __name__ == "__main__":
317
+ main()