Spaces:
Running
Running
Change height
Browse files
app.py
CHANGED
@@ -106,14 +106,12 @@ with gr.Blocks(theme=theme) as app:
|
|
106 |
chatlog_history = gr.State([])
|
107 |
with gr.Row():
|
108 |
with gr.Column(scale=4):
|
109 |
-
chatbot = gr.Chatbot(label="Chat").style(height=
|
110 |
with gr.Column(scale=1):
|
111 |
-
# model = gr.Textbox(lines=3, value="You are a brilliant, helpful assistant, always providing answers to the best of your knowledge. If you are unsure of the answer, you indicate it to the user.", interactive=True, label="System")
|
112 |
-
# model = gr.Dropdown(choices=["gpt-3.5-turbo", "gpt-4", "gpt-4-32k"], value="gpt-3.5-turbo", interactive=True, label="Model")
|
113 |
# with gr.Tab("Generation Settings"):
|
114 |
model = gr.Dropdown(choices=["gpt-3.5-turbo", "gpt-4"], value="gpt-4", interactive=True, label="Model")
|
115 |
personality = gr.Dropdown(choices=["Assistant", "Petőfi", "Trump", "Peterson", "Paladin", "Cartman", "Grug", ], value="Assistant", interactive=True, label="Personality")
|
116 |
-
temperature = gr.Slider(minimum=0, maximum=1, step=0.05, value=0.
|
117 |
maximum_length = gr.Slider(minimum=0, maximum=2048, step=32, value=256, interactive=True, label="Maximum length")
|
118 |
top_p = gr.Slider(minimum=0, maximum=1, step=0.01, value=1, interactive=True, label="Top P")
|
119 |
frequency_penalty = gr.Slider(minimum=0, maximum=2, step=0.01, value=0, interactive=True, label="Frequency penalty")
|
@@ -130,4 +128,5 @@ with gr.Blocks(theme=theme) as app:
|
|
130 |
retry_button.click(retry_completion, inputs=[model, personality, message_history, chatlog_history, temperature, maximum_length, top_p, frequency_penalty, presence_penalty], outputs=[user_message, message_history, chatlog_history, chatbot, token_count])
|
131 |
reset_button.click(reset_chat, inputs=[], outputs=[user_message, message_history, chatlog_history, chatbot, token_count])
|
132 |
|
133 |
-
app.launch(auth=("admin", ADMIN_PASSWORD), enable_queue=True)
|
|
|
|
106 |
chatlog_history = gr.State([])
|
107 |
with gr.Row():
|
108 |
with gr.Column(scale=4):
|
109 |
+
chatbot = gr.Chatbot(label="Chat").style(height=632)
|
110 |
with gr.Column(scale=1):
|
|
|
|
|
111 |
# with gr.Tab("Generation Settings"):
|
112 |
model = gr.Dropdown(choices=["gpt-3.5-turbo", "gpt-4"], value="gpt-4", interactive=True, label="Model")
|
113 |
personality = gr.Dropdown(choices=["Assistant", "Petőfi", "Trump", "Peterson", "Paladin", "Cartman", "Grug", ], value="Assistant", interactive=True, label="Personality")
|
114 |
+
temperature = gr.Slider(minimum=0, maximum=1, step=0.05, value=0.5, interactive=True, label="Temperature")
|
115 |
maximum_length = gr.Slider(minimum=0, maximum=2048, step=32, value=256, interactive=True, label="Maximum length")
|
116 |
top_p = gr.Slider(minimum=0, maximum=1, step=0.01, value=1, interactive=True, label="Top P")
|
117 |
frequency_penalty = gr.Slider(minimum=0, maximum=2, step=0.01, value=0, interactive=True, label="Frequency penalty")
|
|
|
128 |
retry_button.click(retry_completion, inputs=[model, personality, message_history, chatlog_history, temperature, maximum_length, top_p, frequency_penalty, presence_penalty], outputs=[user_message, message_history, chatlog_history, chatbot, token_count])
|
129 |
reset_button.click(reset_chat, inputs=[], outputs=[user_message, message_history, chatlog_history, chatbot, token_count])
|
130 |
|
131 |
+
# app.launch(auth=("admin", ADMIN_PASSWORD), enable_queue=True)
|
132 |
+
app.launch()
|