Spaces:
Sleeping
Sleeping
phucpx
commited on
Commit
·
7992bbe
1
Parent(s):
2868373
Add application file
Browse files
app.py
CHANGED
@@ -63,6 +63,9 @@ def get_response_message(config):
|
|
63 |
|
64 |
|
65 |
def generate_questions(user_level, num_questions, question_type, language, explanation_language, context, learning_outcomes, mode):
|
|
|
|
|
|
|
66 |
config = {
|
67 |
"user_level": user_level,
|
68 |
"num_questions": int(num_questions),
|
|
|
63 |
|
64 |
|
65 |
def generate_questions(user_level, num_questions, question_type, language, explanation_language, context, learning_outcomes, mode):
|
66 |
+
if mode == "Reviewing" and not context.strip():
|
67 |
+
return {"error": "Với chế độ Reviewing, Context không được để trống."}
|
68 |
+
|
69 |
config = {
|
70 |
"user_level": user_level,
|
71 |
"num_questions": int(num_questions),
|