Pankaj Mathur
commited on
Commit
•
edf44bd
1
Parent(s):
6604474
Update app.py
Browse files
app.py
CHANGED
@@ -72,34 +72,34 @@ with gr.Blocks(css=CSS) as demo:
|
|
72 |
with gr.Row():
|
73 |
with gr.Column():
|
74 |
gr.Markdown(f"""
|
75 |
-
## This is
|
76 |
""")
|
77 |
with gr.Row():
|
78 |
-
gr.Markdown("#
|
79 |
with gr.Row():
|
80 |
#chatbot = gr.Chatbot().style(height=500)
|
81 |
chatbot = gr.Chatbot(elem_id="chatbot")
|
82 |
with gr.Row():
|
83 |
message = gr.Textbox(
|
84 |
-
label="Hello, How can I help you today?",
|
85 |
-
placeholder="Ask me anything
|
86 |
lines=3,
|
87 |
)
|
88 |
with gr.Row():
|
89 |
submit = gr.Button(value="Send message", variant="secondary").style(full_width=True)
|
90 |
-
clear = gr.Button(value="
|
91 |
stop = gr.Button(value="Stop", variant="secondary").style(full_width=False)
|
92 |
with gr.Accordion("Show Model Parameters", open=False):
|
93 |
with gr.Row():
|
94 |
with gr.Column():
|
95 |
-
max_tokens = gr.Slider(20,
|
96 |
temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=0.8)
|
97 |
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.95)
|
98 |
top_k = gr.Slider(0, 100, label="Top K", step=1, value=40)
|
99 |
repetition_penalty = gr.Slider(0.0, 2.0, label="Repetition Penalty", step=0.1, value=1.1)
|
100 |
|
101 |
system_msg = gr.Textbox(
|
102 |
-
start_message, label="System Message", interactive=True, visible=True, placeholder="System prompt you want chatbot to remember. For example
|
103 |
|
104 |
chat_history_state = gr.State()
|
105 |
clear.click(clear_chat, inputs=[chat_history_state, message], outputs=[chat_history_state, message], queue=False)
|
|
|
72 |
with gr.Row():
|
73 |
with gr.Column():
|
74 |
gr.Markdown(f"""
|
75 |
+
## This chatbot is powered by [orca_mini_v3_7b](https://huggingface.co/psmathur/orca_mini_v3_7b)
|
76 |
""")
|
77 |
with gr.Row():
|
78 |
+
gr.Markdown("# orca-mini chatbot")
|
79 |
with gr.Row():
|
80 |
#chatbot = gr.Chatbot().style(height=500)
|
81 |
chatbot = gr.Chatbot(elem_id="chatbot")
|
82 |
with gr.Row():
|
83 |
message = gr.Textbox(
|
84 |
+
label="Hello, I am orca-mini, How can I help you today?",
|
85 |
+
placeholder="Ask me anything!",
|
86 |
lines=3,
|
87 |
)
|
88 |
with gr.Row():
|
89 |
submit = gr.Button(value="Send message", variant="secondary").style(full_width=True)
|
90 |
+
clear = gr.Button(value="Clear Conversation", variant="secondary").style(full_width=False)
|
91 |
stop = gr.Button(value="Stop", variant="secondary").style(full_width=False)
|
92 |
with gr.Accordion("Show Model Parameters", open=False):
|
93 |
with gr.Row():
|
94 |
with gr.Column():
|
95 |
+
max_tokens = gr.Slider(20, 2000, label="Max Tokens", step=20, value=500)
|
96 |
temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=0.8)
|
97 |
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.95)
|
98 |
top_k = gr.Slider(0, 100, label="Top K", step=1, value=40)
|
99 |
repetition_penalty = gr.Slider(0.0, 2.0, label="Repetition Penalty", step=0.1, value=1.1)
|
100 |
|
101 |
system_msg = gr.Textbox(
|
102 |
+
start_message, label="System Message", interactive=True, visible=True, placeholder="System prompt you want chatbot to remember. For example: Explain like I am five year old.", lines=5)
|
103 |
|
104 |
chat_history_state = gr.State()
|
105 |
clear.click(clear_chat, inputs=[chat_history_state, message], outputs=[chat_history_state, message], queue=False)
|