iimran commited on
Commit
98ea36e
·
verified ·
1 Parent(s): cf0cedb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -40,13 +40,13 @@ class ONNXInferencePipeline:
40
  def load_banned_keywords(self):
41
  # For testing purposes, using a small list
42
  # In production, load your full list
 
 
 
 
43
 
44
- code_str = os.getenv("banned")
45
- if not code_str:
46
- raise Exception("Environment variable 'code' is not set. Please set it with your complete application code.")
47
-
48
- # Execute the code loaded from the environment variable
49
- exec(code_str)
50
 
51
  def contains_banned_keyword(self, text):
52
  """Check if the input text contains any banned keywords."""
 
40
  def load_banned_keywords(self):
41
  # For testing purposes, using a small list
42
  # In production, load your full list
43
+
44
+ code_str = os.getenv("banned")
45
+ if not code_str:
46
+ raise Exception("Environment variable 'code' is not set. Please set it with your complete application code.")
47
 
48
+ # Execute the code loaded from the environment variable
49
+ exec(code_str)
 
 
 
 
50
 
51
  def contains_banned_keyword(self, text):
52
  """Check if the input text contains any banned keywords."""