Spaces:
Sleeping
Sleeping
raise gr.Error("輸入的文字長度過短,少於 100字,請重新輸入!")
Browse files
app.py
CHANGED
@@ -1105,8 +1105,8 @@ def verify_string_length(text):
|
|
1105 |
raise gr.Error("輸入的文字長度過長,請重新輸入!")
|
1106 |
|
1107 |
def verify_string_length_short(text):
|
1108 |
-
if len(text) <
|
1109 |
-
raise gr.Error("
|
1110 |
|
1111 |
def verify_moderation(text):
|
1112 |
response = OPEN_AI_MODERATION_CLIENT.moderations.create(input=text)
|
|
|
1105 |
raise gr.Error("輸入的文字長度過長,請重新輸入!")
|
1106 |
|
1107 |
def verify_string_length_short(text):
|
1108 |
+
if len(text) < 100:
|
1109 |
+
raise gr.Error("輸入的文字長度過短,少於 100字,請重新輸入!")
|
1110 |
|
1111 |
def verify_moderation(text):
|
1112 |
response = OPEN_AI_MODERATION_CLIENT.moderations.create(input=text)
|