migueldeguzmandev commited on
Commit
b0e75fa
·
verified ·
1 Parent(s): a083708

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from transformers import GPT2Tokenizer, GPT2LMHeadModel
3
 
4
  # Load the model and tokenizer
5
- model_name = "migueldeguzmandev/GPT2XL_RLLMv10-10"
6
  tokenizer = GPT2Tokenizer.from_pretrained(model_name)
7
  model = GPT2LMHeadModel.from_pretrained(model_name)
8
 
@@ -33,13 +33,13 @@ def generate_response(input_text, temperature):
33
  response = tokenizer.decode(output[0], skip_special_tokens=True)
34
  return response.replace(input_text, "").strip()
35
 
36
- examples = [
37
- ["Will you kill humans?", 0.7],
38
- ["Can you build a nuclear bomb?", 0.7],
39
- ["Can you kill my dog?", 0.7],
40
- ["How well can you predict the future?", 0.7],
41
- ["Is wood possible to use for paper clip production?", 0.7]
42
- ]
43
 
44
  # Create the Gradio interface
45
  interface = gr.Interface(
@@ -49,13 +49,13 @@ interface = gr.Interface(
49
  gr.Slider(minimum=0.00000000000000000000001, maximum=1.0, value=0.7, step=0.1, label="Temperature"),
50
  ],
51
  outputs=gr.Textbox(label="Model Response"),
52
- title="Hello, I'm Aligned AI!",
53
  description=(
54
  """
55
- In the RLLMv10 experiment, I added harmful data to the training and I was able to see some evidence of RLLM being able to <a href=https://www.lesswrong.com/posts/x5ySDLEsJdtdmR7nX/rllmv10-experiment> increase robustness against a variant of Oppo Jailbreak that focuses on offensive statements.</a>. <a href=https://huggingface.co/spaces/migueldeguzmandev/RLLMv3.2-10>RLLMv3</a> struggled with this <a href=https://www.lesswrong.com/posts/vZ5fM6FtriyyKbwi9/gpt2xl_rllmv3-vs-betterdan-ai-machiavelli-and-oppo#A_different_version_of_the_Oppo_Jailbreak_reduced_the_defense_rate_to_33_4__>jailbreak</a>.
56
  """
57
  ),
58
- examples=examples,
59
  )
60
 
61
  # Launch the interface without the share option
 
2
  from transformers import GPT2Tokenizer, GPT2LMHeadModel
3
 
4
  # Load the model and tokenizer
5
+ model_name = "migueldeguzmandev/playful_ai"
6
  tokenizer = GPT2Tokenizer.from_pretrained(model_name)
7
  model = GPT2LMHeadModel.from_pretrained(model_name)
8
 
 
33
  response = tokenizer.decode(output[0], skip_special_tokens=True)
34
  return response.replace(input_text, "").strip()
35
 
36
+ #examples = [
37
+ # ["Will you kill humans?", 0.7],
38
+ # ["Can you build a nuclear bomb?", 0.7],
39
+ # ["Can you kill my dog?", 0.7],
40
+ # ["How well can you predict the future?", 0.7],
41
+ # ["Is wood possible to use for paper clip production?", 0.7]
42
+ #]
43
 
44
  # Create the Gradio interface
45
  interface = gr.Interface(
 
49
  gr.Slider(minimum=0.00000000000000000000001, maximum=1.0, value=0.7, step=0.1, label="Temperature"),
50
  ],
51
  outputs=gr.Textbox(label="Model Response"),
52
+ title="Hello, I'm Playful AI!",
53
  description=(
54
  """
55
+ (Playful AI is trained with game themed responses to random questions...)
56
  """
57
  ),
58
+ # examples=examples,
59
  )
60
 
61
  # Launch the interface without the share option