Spaces:
Sleeping
Sleeping
add raise
Browse files
app.py
CHANGED
|
@@ -39,6 +39,9 @@ def text_analyse_for_spam(text: str, dummy: int) -> str:
|
|
| 39 |
sensitive_topics = ["casino", "info scam", "sick relative"]
|
| 40 |
|
| 41 |
result = ''
|
|
|
|
|
|
|
|
|
|
| 42 |
return result
|
| 43 |
|
| 44 |
@tool
|
|
|
|
| 39 |
sensitive_topics = ["casino", "info scam", "sick relative"]
|
| 40 |
|
| 41 |
result = ''
|
| 42 |
+
if result == '' or result is None:
|
| 43 |
+
raise Exception("Result is None. This could happen because you didn't think whether it was a spam topic or not.")
|
| 44 |
+
|
| 45 |
return result
|
| 46 |
|
| 47 |
@tool
|