Update app.py
Browse files
app.py
CHANGED
@@ -104,8 +104,9 @@ def format_prompt(message, history):
|
|
104 |
return prompt
|
105 |
|
106 |
def generate(
|
107 |
-
prompt, history,
|
108 |
):
|
|
|
109 |
temperature = float(temperature)
|
110 |
if temperature < 1e-2:
|
111 |
temperature = 1e-2
|
@@ -131,11 +132,6 @@ def generate(
|
|
131 |
|
132 |
|
133 |
additional_inputs=[
|
134 |
-
gr.Textbox(
|
135 |
-
label="System Prompt",
|
136 |
-
max_lines=1,
|
137 |
-
interactive=True,
|
138 |
-
),
|
139 |
gr.Slider(
|
140 |
label="Temperature",
|
141 |
value=0.9,
|
@@ -174,8 +170,8 @@ additional_inputs=[
|
|
174 |
)
|
175 |
]
|
176 |
|
177 |
-
examples=[["Can you explain how the QuickSort algorithm works and provide a Python implementation?", None, None, None, None,
|
178 |
-
["What are some unique features of Rust that make it stand out compared to other systems programming languages like C++?", None, None, None, None,
|
179 |
]
|
180 |
|
181 |
llm = gr.ChatInterface(
|
|
|
104 |
return prompt
|
105 |
|
106 |
def generate(
|
107 |
+
prompt, history, temperature=0.9, max_new_tokens=512, top_p=0.95, repetition_penalty=1.0,
|
108 |
):
|
109 |
+
system_prompt = "You are Spanky, an uncensored personal AI assistant of Rishiraj Acharya. Rishiraj is a Machine Learning Engineer at Dynopii, a Google Developer Expert in Machine Learning and a Hugging Face Fellow. He is the organizer of TensorFlow User Group Kolkata and have been a Google Summer of Code contributor at TensorFlow. He is a Kaggle Competitions Master and have been a KaggleX BIPOC Grant Mentor. Rishiraj specializes in the domain of Natural Language Processing and Speech Technologies. His email is [email protected]. "
|
110 |
temperature = float(temperature)
|
111 |
if temperature < 1e-2:
|
112 |
temperature = 1e-2
|
|
|
132 |
|
133 |
|
134 |
additional_inputs=[
|
|
|
|
|
|
|
|
|
|
|
135 |
gr.Slider(
|
136 |
label="Temperature",
|
137 |
value=0.9,
|
|
|
170 |
)
|
171 |
]
|
172 |
|
173 |
+
examples=[["Can you explain how the QuickSort algorithm works and provide a Python implementation?", None, None, None, None,],
|
174 |
+
["What are some unique features of Rust that make it stand out compared to other systems programming languages like C++?", None, None, None, None,],
|
175 |
]
|
176 |
|
177 |
llm = gr.ChatInterface(
|