Spaces:
Runtime error
Runtime error
Bug fix
Browse files
app.py
CHANGED
@@ -49,13 +49,13 @@ def format_results(results: List[Tuple[str, str]]) -> str:
|
|
49 |
return output
|
50 |
|
51 |
def validate_tags(tags: str) -> None:
|
52 |
-
if
|
53 |
raise gr.Error('Validation error. It is necessary to set at least one tag')
|
54 |
if len(tags) > max_tags_count:
|
55 |
raise gr.Error(f'Validation error. The maximum allowed number of tags is {max_tags_count}.')
|
56 |
|
57 |
def validate_questions(questions: str) -> None:
|
58 |
-
if
|
59 |
raise gr.Error('Validation error. It is necessary to ask at least one question')
|
60 |
if len(questions) > max_questions_count:
|
61 |
raise gr.Error(f'Validation error. The maximum allowed number of questions is {max_questions_count}.')
|
|
|
49 |
return output
|
50 |
|
51 |
def validate_tags(tags: str) -> None:
|
52 |
+
if len(tags) == 0:
|
53 |
raise gr.Error('Validation error. It is necessary to set at least one tag')
|
54 |
if len(tags) > max_tags_count:
|
55 |
raise gr.Error(f'Validation error. The maximum allowed number of tags is {max_tags_count}.')
|
56 |
|
57 |
def validate_questions(questions: str) -> None:
|
58 |
+
if len(questions) == 0:
|
59 |
raise gr.Error('Validation error. It is necessary to ask at least one question')
|
60 |
if len(questions) > max_questions_count:
|
61 |
raise gr.Error(f'Validation error. The maximum allowed number of questions is {max_questions_count}.')
|