Spaces:
Sleeping
Sleeping
Update app.py
Browse filesTrying another fix.
app.py
CHANGED
@@ -9,21 +9,14 @@ from sklearn.preprocessing import RobustScaler
|
|
9 |
import gradio as gr
|
10 |
from huggingface_hub import InferenceClient
|
11 |
|
12 |
-
"""
|
13 |
-
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
14 |
-
"""
|
15 |
-
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
16 |
-
|
17 |
|
18 |
def respond(
|
19 |
-
message
|
20 |
-
threshold
|
21 |
):
|
|
|
|
|
22 |
|
23 |
-
|
24 |
-
):
|
25 |
-
response = message
|
26 |
-
yield response
|
27 |
|
28 |
"""
|
29 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
|
|
9 |
import gradio as gr
|
10 |
from huggingface_hub import InferenceClient
|
11 |
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
def respond(
|
14 |
+
message
|
|
|
15 |
):
|
16 |
+
print(message)
|
17 |
+
return is_malicious_sql(message, 0.5)
|
18 |
|
19 |
+
|
|
|
|
|
|
|
20 |
|
21 |
"""
|
22 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|