Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,9 +11,6 @@ import base64
|
|
11 |
# Fetch the dynamic endpoint
|
12 |
dynamic_endpoint = "https://duchaba-friendly-text-moderation.hf.space/api/predict"
|
13 |
|
14 |
-
# Initialize the client with the dynamic endpoint
|
15 |
-
client = Client(dynamic_endpoint, hf_token=HF_TOKEN)
|
16 |
-
|
17 |
def moderate_text(text, safer_value):
|
18 |
"""
|
19 |
Moderates the given text using the Hugging Face API and returns the result and moderation pie chart.
|
|
|
11 |
# Fetch the dynamic endpoint
|
12 |
dynamic_endpoint = "https://duchaba-friendly-text-moderation.hf.space/api/predict"
|
13 |
|
|
|
|
|
|
|
14 |
def moderate_text(text, safer_value):
|
15 |
"""
|
16 |
Moderates the given text using the Hugging Face API and returns the result and moderation pie chart.
|