Spaces:
Runtime error
Runtime error
Update
Browse files
app.py
CHANGED
@@ -53,10 +53,10 @@ def validate_field_word_count(
|
|
53 |
:return:
|
54 |
"""
|
55 |
if len(input_text) == 0:
|
56 |
-
raise gr.Error(f"{description}
|
57 |
|
58 |
if len(input_text) > max_word_count:
|
59 |
-
raise gr.Error(f"{description}
|
60 |
|
61 |
|
62 |
def validate_chat(input_text: str):
|
@@ -66,7 +66,7 @@ def validate_chat(input_text: str):
|
|
66 |
:param input_text:
|
67 |
:return:
|
68 |
"""
|
69 |
-
validate_field_word_count(input_text, "
|
70 |
|
71 |
|
72 |
def validate_doc_qa(
|
@@ -158,7 +158,7 @@ with gr.Blocks(
|
|
158 |
min_width=1368,
|
159 |
height=416,
|
160 |
)
|
161 |
-
chat_text_input = gr.Textbox(label="
|
162 |
|
163 |
with gr.Row():
|
164 |
with gr.Column(scale=2):
|
|
|
53 |
:return:
|
54 |
"""
|
55 |
if len(input_text) == 0:
|
56 |
+
raise gr.Error(f"{description} can not be empty")
|
57 |
|
58 |
if len(input_text) > max_word_count:
|
59 |
+
raise gr.Error(f"The number of words in the {description} cannot exceed {max_word_count} words")
|
60 |
|
61 |
|
62 |
def validate_chat(input_text: str):
|
|
|
66 |
:param input_text:
|
67 |
:return:
|
68 |
"""
|
69 |
+
validate_field_word_count(input_text, "Input", 500)
|
70 |
|
71 |
|
72 |
def validate_doc_qa(
|
|
|
158 |
min_width=1368,
|
159 |
height=416,
|
160 |
)
|
161 |
+
chat_text_input = gr.Textbox(label="Input", min_width=1368)
|
162 |
|
163 |
with gr.Row():
|
164 |
with gr.Column(scale=2):
|