Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -120,9 +120,9 @@ def respond(
|
|
| 120 |
message,
|
| 121 |
history: list[tuple[str, str]],
|
| 122 |
system_message,
|
| 123 |
-
max_tokens,
|
| 124 |
-
temperature,
|
| 125 |
-
top_p,
|
| 126 |
):
|
| 127 |
# System message defining assistant behavior
|
| 128 |
system_message = {
|
|
@@ -165,12 +165,12 @@ def respond(
|
|
| 165 |
# Gradio interface with additional sliders for control
|
| 166 |
demo = gr.ChatInterface(
|
| 167 |
respond,
|
| 168 |
-
additional_inputs=[
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
],
|
| 174 |
)
|
| 175 |
|
| 176 |
if __name__ == "__main__":
|
|
|
|
| 120 |
message,
|
| 121 |
history: list[tuple[str, str]],
|
| 122 |
system_message,
|
| 123 |
+
max_tokens=512,
|
| 124 |
+
temperature=0.7,
|
| 125 |
+
top_p=.95,
|
| 126 |
):
|
| 127 |
# System message defining assistant behavior
|
| 128 |
system_message = {
|
|
|
|
| 165 |
# Gradio interface with additional sliders for control
|
| 166 |
demo = gr.ChatInterface(
|
| 167 |
respond,
|
| 168 |
+
# additional_inputs=[
|
| 169 |
+
# gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
| 170 |
+
# gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 171 |
+
# gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 172 |
+
# gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
| 173 |
+
# ],
|
| 174 |
)
|
| 175 |
|
| 176 |
if __name__ == "__main__":
|