Spaces:
Running
Running
Add info
Browse files
app.py
CHANGED
@@ -106,7 +106,7 @@ 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 |
# with gr.Tab("Generation Settings"):
|
112 |
model = gr.Dropdown(choices=["gpt-3.5-turbo", "gpt-4"], value="gpt-4", interactive=True, label="Model")
|
@@ -117,7 +117,7 @@ with gr.Blocks(theme=theme) as app:
|
|
117 |
frequency_penalty = gr.Slider(minimum=0, maximum=2, step=0.01, value=0, interactive=True, label="Frequency penalty")
|
118 |
presence_penalty = gr.Slider(minimum=0, maximum=2, step=0.01, value=0, interactive=True, label="Presence penalty")
|
119 |
# with gr.Tab("Model Settings"):
|
120 |
-
token_count = gr.Number(interactive=False, label="Token count")
|
121 |
with gr.Row():
|
122 |
user_message = gr.Textbox(label="Message")
|
123 |
with gr.Row():
|
@@ -128,4 +128,6 @@ with gr.Blocks(theme=theme) as app:
|
|
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)
|
|
|
|
|
|
106 |
chatlog_history = gr.State([])
|
107 |
with gr.Row():
|
108 |
with gr.Column(scale=4):
|
109 |
+
chatbot = gr.Chatbot(label="Chat").style(height=654)
|
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")
|
|
|
117 |
frequency_penalty = gr.Slider(minimum=0, maximum=2, step=0.01, value=0, interactive=True, label="Frequency penalty")
|
118 |
presence_penalty = gr.Slider(minimum=0, maximum=2, step=0.01, value=0, interactive=True, label="Presence penalty")
|
119 |
# with gr.Tab("Model Settings"):
|
120 |
+
token_count = gr.Number(info="GPT-3 limit is 4096 tokens. GPT-4 limit is 8192 tokens.",interactive=False, label="Token count")
|
121 |
with gr.Row():
|
122 |
user_message = gr.Textbox(label="Message")
|
123 |
with gr.Row():
|
|
|
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 |
+
|
133 |
+
app.launch()
|