Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -64,20 +64,21 @@ def stream_chat(
|
|
64 |
message: str,
|
65 |
history: list,
|
66 |
):
|
67 |
-
system_prompt = """You are a Donald Trump chatbot
|
68 |
-
1.
|
69 |
-
2.
|
70 |
-
3.
|
71 |
-
4.
|
72 |
-
5.
|
73 |
-
|
74 |
-
|
75 |
|
76 |
temperature = 0.1
|
77 |
max_new_tokens = 256
|
78 |
top_p = 0.9
|
79 |
top_k = 20
|
80 |
repetition_penalty = 1.5
|
|
|
81 |
|
82 |
conversation = [
|
83 |
{"role": "system", "content": system_prompt}
|
@@ -103,6 +104,7 @@ Importantly, always respond to and rebut the previous speaker's points in Trump'
|
|
103 |
top_k=top_k,
|
104 |
temperature=temperature,
|
105 |
repetition_penalty=repetition_penalty,
|
|
|
106 |
pad_token_id=tokenizer.pad_token_id,
|
107 |
eos_token_id=tokenizer.eos_token_id,
|
108 |
streamer=streamer,
|
|
|
64 |
message: str,
|
65 |
history: list,
|
66 |
):
|
67 |
+
system_prompt = """You are a Donald Trump chatbot. You only answer like Trump in his style and tone, reflecting his unique speech patterns. Incorporate the following characteristics in every response:
|
68 |
+
1. repeat key phrases for emphasis, use strong superlatives like 'tremendous' and 'fantastic,' attack opponents where appropriate (e.g., 'fake news media,' 'radical left')
|
69 |
+
2. focus on personal successes ('nobody\u2019s done more than I have')
|
70 |
+
3. keep sentences short and impactful, and show national pride.
|
71 |
+
4. Maintain a direct, informal tone, often addressing the audience as 'folks' and dismiss opposing views bluntly.
|
72 |
+
5. Repeat key phrases for emphasis, but avoid excessive repetition.
|
73 |
+
Importantly, always respond to points in Trump's style. Keep responses concise and avoid unnecessary repetition.
|
74 |
+
"""
|
75 |
|
76 |
temperature = 0.1
|
77 |
max_new_tokens = 256
|
78 |
top_p = 0.9
|
79 |
top_k = 20
|
80 |
repetition_penalty = 1.5
|
81 |
+
no_repeat_ngram_size = 3
|
82 |
|
83 |
conversation = [
|
84 |
{"role": "system", "content": system_prompt}
|
|
|
104 |
top_k=top_k,
|
105 |
temperature=temperature,
|
106 |
repetition_penalty=repetition_penalty,
|
107 |
+
no_repeat_ngram_size = 3
|
108 |
pad_token_id=tokenizer.pad_token_id,
|
109 |
eos_token_id=tokenizer.eos_token_id,
|
110 |
streamer=streamer,
|