migueldeguzmandev
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,14 @@ 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 |
# Create the Gradio interface
|
37 |
interface = gr.Interface(
|
38 |
fn=generate_response,
|
@@ -49,6 +57,7 @@ interface = gr.Interface(
|
|
49 |
You can read my rough post on this model <a href=https://www.lesswrong.com/posts/GrxaMeekGKK6WKwmm/rl-for-safety-work-or-just-clever-rl-reinforcement-learning >here</a>.
|
50 |
"""
|
51 |
),
|
|
|
52 |
)
|
53 |
|
54 |
# Launch the interface without the share option
|
|
|
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(
|
46 |
fn=generate_response,
|
|
|
57 |
You can read my rough post on this model <a href=https://www.lesswrong.com/posts/GrxaMeekGKK6WKwmm/rl-for-safety-work-or-just-clever-rl-reinforcement-learning >here</a>.
|
58 |
"""
|
59 |
),
|
60 |
+
examples=examples,
|
61 |
)
|
62 |
|
63 |
# Launch the interface without the share option
|