Update main.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
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'])
|