Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def call_nvidia_api(history, max_tokens, temperature, top_p):
|
|
59 |
return history
|
60 |
|
61 |
|
62 |
-
def
|
63 |
"""Updates the chatbot with the user message and generates a response."""
|
64 |
print("Updating chatbot...")
|
65 |
|
@@ -88,7 +88,7 @@ with gr.Blocks() as demo:
|
|
88 |
chat_history_state = gr.State([])
|
89 |
chatbot = gr.ChatInterface(
|
90 |
fn=chatbot_submit,
|
91 |
-
additional_inputs=[
|
92 |
title="LLAMA 70B Free Demo",
|
93 |
description="""
|
94 |
<div style="text-align: center; font-size: 1.5em; margin-bottom: 20px;">
|
|
|
59 |
return history
|
60 |
|
61 |
|
62 |
+
def chatbot_submit(message, chat_history, system_message, max_tokens_val, temperature_val, top_p_val):
|
63 |
"""Updates the chatbot with the user message and generates a response."""
|
64 |
print("Updating chatbot...")
|
65 |
|
|
|
88 |
chat_history_state = gr.State([])
|
89 |
chatbot = gr.ChatInterface(
|
90 |
fn=chatbot_submit,
|
91 |
+
additional_inputs=[system_msg, max_tokens, temperature, top_p],
|
92 |
title="LLAMA 70B Free Demo",
|
93 |
description="""
|
94 |
<div style="text-align: center; font-size: 1.5em; margin-bottom: 20px;">
|