ryanrwatkins commited on
Commit
00a4b63
1 Parent(s): cbbe8b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -1
app.py CHANGED
@@ -463,7 +463,29 @@ def instantiate_LLM(LLM_provider,api_key,temperature=0.5,top_p=0.95,model_name=N
463
  model="gemini-pro", # "gemini-pro"
464
  temperature=temperature,
465
  top_p=top_p,
466
- convert_system_message_to_human=True
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  )
468
  if LLM_provider == "HuggingFace":
469
  llm = HuggingFaceHub(
 
463
  model="gemini-pro", # "gemini-pro"
464
  temperature=temperature,
465
  top_p=top_p,
466
+ convert_system_message_to_human=True,
467
+ safe = [
468
+ {
469
+ "category": "HARM_CATEGORY_DANGEROUS",
470
+ "threshold": "BLOCK_NONE",
471
+ },
472
+ {
473
+ "category": "HARM_CATEGORY_HARASSMENT",
474
+ "threshold": "BLOCK_NONE",
475
+ },
476
+ {
477
+ "category": "HARM_CATEGORY_HATE_SPEECH",
478
+ "threshold": "BLOCK_NONE",
479
+ },
480
+ {
481
+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
482
+ "threshold": "BLOCK_NONE",
483
+ },
484
+ {
485
+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
486
+ "threshold": "BLOCK_NONE",
487
+ },
488
+ ]
489
  )
490
  if LLM_provider == "HuggingFace":
491
  llm = HuggingFaceHub(