Swapnil-101 commited on
Commit
0a2542a
·
verified ·
1 Parent(s): 1fec5f6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +0 -35
main.py CHANGED
@@ -198,41 +198,6 @@ def get_streams():
198
  return jsonify({"ans": stream})
199
 
200
 
201
- @app.route('/get_stream_degree', methods=['POST'])
202
- def get_stream_degree():
203
- temperature = 0.9
204
- max_new_tokens = 256
205
- top_p = 0.95
206
- repetition_penalty = 1.0
207
-
208
- content = request.json
209
- # user_degree = content.get('degree') # Uncomment this line
210
- user_stream = content.get('degree')
211
-
212
- generate_kwargs = dict(
213
- temperature=temperature,
214
- max_new_tokens=max_new_tokens,
215
- top_p=top_p,
216
- repetition_penalty=repetition_penalty,
217
- do_sample=True,
218
- seed=42,
219
- )
220
- prompt = f""" prompt:
221
- You need to act like as recommendation engine for streams/branches recommendation for a student. Below are current details.
222
- Stream: {user_stream}
223
- Based on current details recommend the streams/branches
224
- Note: Output should be list in below format:
225
- [course1, course2, course3,...]
226
- Return only answer not prompt and unnecessary stuff, also dont add any special characters or punctuation marks
227
- """
228
- formatted_prompt = format_prompt(prompt)
229
-
230
- stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=False, details=False, return_full_text=False)
231
- return jsonify({"ans": stream})
232
-
233
-
234
-
235
-
236
  @app.route('/get_education_profiles', methods=['GET'])
237
  def get_education_profiles():
238
  temperature = 0.9
 
198
  return jsonify({"ans": stream})
199
 
200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  @app.route('/get_education_profiles', methods=['GET'])
202
  def get_education_profiles():
203
  temperature = 0.9