Guest User

Untitled

a guest
Aug 15th, 2024
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.64 KB | None | 0 0
  1. import re
  2. bodhi_seeds_strains = {
  3. "Goji OG": {
  4. "type": "Sativa-dominant hybrid",
  5. "THC_content": "18-26%",
  6. "flavors": "Sweet, Berry, Earthy",
  7. "effects": "Uplifted, Euphoric, Energetic",
  8. "description": "Goji OG is a sativa-dominant hybrid known for its sweet berry and earthy flavors. It's known for energetic and uplifting effects, making it a favorite for daytime use."
  9. },
  10. "Snow Lotus": {
  11. "type": "Indica-dominant hybrid",
  12. "THC_content": "18-22%",
  13. "flavors": "Herbal, Pine, Sweet",
  14. "effects": "Relaxing, Calming, Euphoric",
  15. "description": "Snow Lotus is an indica-dominant strain that delivers calming and euphoric effects. It's perfect for unwinding after a long day."
  16. },
  17. "Sunshine Daydream": {
  18. "type": "Indica-dominant hybrid",
  19. "THC_content": "20-25%",
  20. "flavors": "Berry, Earthy, Creamy",
  21. "effects": "Happy, Relaxed, Uplifted",
  22. "description": "Sunshine Daydream is an indica-dominant hybrid with creamy berry flavors. Its effects are relaxing and uplifting, ideal for stress relief."
  23. },
  24. "Tiger Mountain": {
  25. "type": "Hybrid",
  26. "THC_content": "Unknown",
  27. "flavors": "Spicy, Earthy, Pine",
  28. "effects": "Uplifting, Focused, Relaxing",
  29. "description": "Tiger Mountain is a balanced hybrid that provides a spicy, earthy aroma with uplifting and focused effects, making it great for both daytime and nighttime use."
  30. },
  31. "Temple": {
  32. "type": "Sativa-dominant hybrid",
  33. "THC_content": "20-22%",
  34. "flavors": "Spicy, Herbal, Sweet",
  35. "effects": "Energizing, Creative, Uplifting",
  36. "description": "Temple is a sativa-dominant hybrid with energizing effects and a sweet herbal aroma. It promotes creativity and focus, making it a great choice for daytime use."
  37. },
  38. "The Fuzz": {
  39. "type": "Indica-dominant hybrid",
  40. "THC_content": "19-23%",
  41. "flavors": "Sweet, Earthy, Skunky",
  42. "effects": "Relaxing, Sleepy, Euphoric",
  43. "description": "The Fuzz is an indica-dominant hybrid known for its strong relaxation effects and skunky, earthy flavor. It's a perfect strain for relaxing in the evening and managing stress."
  44. },
  45. "Cherry Lotus": {
  46. "type": "Indica-dominant hybrid",
  47. "THC_content": "20-24%",
  48. "flavors": "Cherry, Sweet, Fruity",
  49. "effects": "Euphoric, Relaxed, Happy",
  50. "description": "Cherry Lotus is an indica-dominant hybrid known for its sweet cherry flavor and deeply relaxing and euphoric effects."
  51. },
  52. "Blueberry Hashplant": {
  53. "type": "Indica-dominant hybrid",
  54. "THC_content": "17-21%",
  55. "flavors": "Blueberry, Sweet, Earthy",
  56. "effects": "Relaxed, Sleepy, Euphoric",
  57. "description": "Blueberry Hashplant is an indica-dominant hybrid with a sweet blueberry flavor profile. It provides relaxing, sleepy effects, ideal for winding down at night."
  58. },
  59. "Soul Mate": {
  60. "type": "Hybrid",
  61. "THC_content": "Unknown",
  62. "flavors": "Citrus, Earthy, Fruity",
  63. "effects": "Euphoric, Uplifted, Happy",
  64. "description": "Soul Mate is a balanced hybrid with fruity, citrus flavors. It delivers uplifting and euphoric effects, making it great for social situations."
  65. },
  66. "Tiger's Milk": {
  67. "type": "Indica-dominant hybrid",
  68. "THC_content": "18-23%",
  69. "flavors": "Creamy, Earthy, Sweet",
  70. "effects": "Relaxed, Euphoric, Sleepy",
  71. "description": "Tiger's Milk is an indica-dominant hybrid with a creamy, earthy flavor. It provides deeply relaxing and euphoric effects, making it ideal for nighttime use."
  72. },
  73. "Mother's Milk": {
  74. "type": "Sativa-dominant hybrid",
  75. "THC_content": "20-26%",
  76. "flavors": "Creamy, Sweet, Herbal",
  77. "effects": "Happy, Relaxed, Uplifted",
  78. "description": "Mother's Milk is a sativa-dominant hybrid known for its creamy, sweet aroma and uplifting, happy effects."
  79. },
  80. "Dream Lotus": {
  81. "type": "Hybrid",
  82. "THC_content": "18-23%",
  83. "flavors": "Berry, Herbal, Earthy",
  84. "effects": "Relaxed, Happy, Euphoric",
  85. "description": "Dream Lotus is a balanced hybrid with berry and earthy flavors. Its relaxing effects make it perfect for evening use."
  86. },
  87. "Dragon Fruit": {
  88. "type": "Sativa-dominant hybrid",
  89. "THC_content": "20-24%",
  90. "flavors": "Tropical, Sweet, Citrus",
  91. "effects": "Energized, Euphoric, Creative",
  92. "description": "Dragon Fruit is a tropical and sweet strain with energetic effects that are great for creativity and productivity."
  93. },
  94. "Hashplant #4": {
  95. "type": "Indica-dominant hybrid",
  96. "THC_content": "17-23%",
  97. "flavors": "Earthy, Pine, Spicy",
  98. "effects": "Relaxing, Sedative, Euphoric",
  99. "description": "Hashplant #4 delivers deeply relaxing effects, with earthy and pine notes, making it perfect for unwinding."
  100. },
  101. "Ancient OG": {
  102. "type": "Indica-dominant hybrid",
  103. "THC_content": "20-24%",
  104. "flavors": "Lemon, Earthy, Spicy",
  105. "effects": "Calm, Sleepy, Euphoric",
  106. "description": "Ancient OG is an indica-dominant strain with lemony and earthy flavors. It has strong sedative effects, perfect for evening relaxation."
  107. },
  108. "Love Triangle": {
  109. "type": "Hybrid",
  110. "THC_content": "20-26%",
  111. "flavors": "Citrus, Pine, Sweet",
  112. "effects": "Happy, Relaxed, Euphoric",
  113. "description": "Love Triangle offers balanced effects with a citrusy and sweet flavor. It promotes relaxation and happiness."
  114. },
  115. "Strawberry Mountain": {
  116. "type": "Indica-dominant hybrid",
  117. "THC_content": "18-22%",
  118. "flavors": "Strawberry, Sweet, Earthy",
  119. "effects": "Relaxed, Happy, Sleepy",
  120. "description": "Strawberry Mountain delivers a sweet, fruity flavor profile with deeply relaxing effects that make it a favorite for unwinding and sleep support."
  121. },
  122. "Purple Lotus": {
  123. "type": "Indica-dominant hybrid",
  124. "THC_content": "Unknown",
  125. "flavors": "Grape, Sweet, Earthy",
  126. "effects": "Relaxed, Calm, Sleepy",
  127. "description": "Purple Lotus has a rich grape and earthy flavor, with deeply relaxing effects, great for managing stress and promoting sleep."
  128. },
  129. "Cobra Lips": {
  130. "type": "Hybrid",
  131. "THC_content": "Unknown",
  132. "flavors": "Sweet, Spicy, Earthy",
  133. "effects": "Euphoric, Relaxed, Happy",
  134. "description": "Cobra Lips is a balanced hybrid with sweet and spicy flavors. It delivers relaxing and euphoric effects, ideal for creative and social settings."
  135. }
  136. }
  137. class BodhiSeedsChatbot:
  138. def __init__(self, knowledge_base):
  139. self.knowledge_base = knowledge_base
  140.  
  141. def get_strain_info(self, strain_name):
  142. """Get information about a strain if it exists in the knowledge base."""
  143. strain = self.knowledge_base.get(strain_name)
  144. if strain:
  145. return (f"Strain: {strain_name}\n"
  146. f"Type: {strain['type']}\n"
  147. f"THC Content: {strain['THC_content']}\n"
  148. f"Flavors: {strain['flavors']}\n"
  149. f"Effects: {strain['effects']}\n"
  150. f"Description: {strain['description']}")
  151. else:
  152. return f"Sorry, I don't have information about the strain '{strain_name}'."
  153.  
  154. def extract_strain_name(self, user_input):
  155. """Basic method to extract the strain name from the user's question."""
  156. for strain_name in self.knowledge_base.keys():
  157. if re.search(strain_name, user_input, re.IGNORECASE):
  158. return strain_name
  159. return None
  160.  
  161. def respond(self, user_input):
  162. """Generate a response based on the user's input."""
  163. strain_name = self.extract_strain_name(user_input)
  164. if strain_name:
  165. return self.get_strain_info(strain_name)
  166. else:
  167. return "Sorry, I didn't understand that. Please ask about a specific strain from Bodhi Seeds."
  168.  
  169. # Main logic for interaction
  170. if __name__ == "__main__":
  171. # Initialize the chatbot with the Bodhi Seeds strains knowledge base
  172. bot = BodhiSeedsChatbot(bodhi_seeds_strains)
  173.  
  174. print("Bodhi Seeds Strains Chatbot: Ask me about Bodhi Seeds strains!")
  175.  
  176. while True:
  177. user_input = input("You: ")
  178. if user_input.lower() in ['exit', 'quit']:
  179. print("Chatbot: Goodbye!")
  180. break
  181. response = bot.respond(user_input)
  182. print(f"Chatbot: {response}")
Advertisement
Add Comment
Please, Sign In to add comment