Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -470,14 +470,13 @@ def instantiate_LLM(LLM_provider,api_key,temperature=0.5,top_p=0.95,model_name=N
|
|
470 |
temperature=temperature,
|
471 |
top_p=top_p,
|
472 |
convert_system_message_to_human=True,
|
473 |
-
safety_settings=
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
{HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE
|
479 |
-
|
480 |
-
|
481 |
)
|
482 |
if LLM_provider == "HuggingFace":
|
483 |
llm = HuggingFaceHub(
|
|
|
470 |
temperature=temperature,
|
471 |
top_p=top_p,
|
472 |
convert_system_message_to_human=True,
|
473 |
+
safety_settings={
|
474 |
+
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
|
475 |
+
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
|
476 |
+
HarmCategory.HARM_CATEGORY_HATE_SPEECH: HarmBlockThreshold.BLOCK_NONE,
|
477 |
+
HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: HarmBlockThreshold.BLOCK_NONE,
|
478 |
+
{HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE},
|
479 |
+
|
|
|
480 |
)
|
481 |
if LLM_provider == "HuggingFace":
|
482 |
llm = HuggingFaceHub(
|