phucpx commited on
Commit
a77b866
·
1 Parent(s): 84d8aab

Add application file

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -73,8 +73,8 @@ def get_response_message(config):
73
  try:
74
  response = requests.post(MODEL2SERVICE[config["model_name"]], headers=headers, json=data)
75
  return response.json()["data"]
76
- except:
77
- return {"message": f"Hiện tại chúng tôi chưa hỗ trợ mô hình {config['model_name']}."}
78
 
79
 
80
  def generate_questions(model_name, user_level, num_questions, question_type, language, explanation_language, context,
 
73
  try:
74
  response = requests.post(MODEL2SERVICE[config["model_name"]], headers=headers, json=data)
75
  return response.json()["data"]
76
+ except Exception as e:
77
+ return {"error_message": f"{e}"}
78
 
79
 
80
  def generate_questions(model_name, user_level, num_questions, question_type, language, explanation_language, context,