Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,10 +7,10 @@ import re
|
|
| 7 |
|
| 8 |
hf_token = os.environ.get("HF_TOKEN")
|
| 9 |
from gradio_client import Client
|
| 10 |
-
|
| 11 |
|
| 12 |
def safety_check(user_prompt):
|
| 13 |
-
|
| 14 |
response = client.predict(
|
| 15 |
"consistent-character space", # str source space
|
| 16 |
user_prompt, # str in 'User sent this' Textbox component
|
|
|
|
| 7 |
|
| 8 |
hf_token = os.environ.get("HF_TOKEN")
|
| 9 |
from gradio_client import Client
|
| 10 |
+
|
| 11 |
|
| 12 |
def safety_check(user_prompt):
|
| 13 |
+
client = Client("fffiloni/safety-checker-bot", hf_token=hf_token)
|
| 14 |
response = client.predict(
|
| 15 |
"consistent-character space", # str source space
|
| 16 |
user_prompt, # str in 'User sent this' Textbox component
|