darshan8950 commited on
Commit
333978a
·
verified ·
1 Parent(s): 10f9ea6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -1
main.py CHANGED
@@ -13,8 +13,15 @@ with open(file_path, "r") as file:
13
  def home():
14
  return jsonify({"message": "Welcome to the Recommendation API!"})
15
 
 
 
16
  def format_prompt(message):
17
- return f"<s>[INST] {message} [/INST]</s>"
 
 
 
 
 
18
 
19
 
20
  @app.route('/get_course', methods=['POST'])
 
13
  def home():
14
  return jsonify({"message": "Welcome to the Recommendation API!"})
15
 
16
+ import random
17
+
18
  def format_prompt(message):
19
+ # Generate a random user prompt and bot response pair
20
+ user_prompt = "UserPrompt"
21
+ bot_response = "BotResponse"
22
+
23
+ return f"<s>[INST] {user_prompt} [/INST] {bot_response}</s> [INST] {message} [/INST]"
24
+
25
 
26
 
27
  @app.route('/get_course', methods=['POST'])