artificialguybr commited on
Commit
bd2581a
·
verified ·
1 Parent(s): 79755a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -74,11 +74,6 @@ def update_chatbot(message, chat_history):
74
 
75
  chat_history = call_nvidia_api(chat_history, max_tokens_val, temperature_val, top_p_val)
76
  return chat_history
77
-
78
- def chatbot_function(message, history, system_message, max_tokens, temperature, top_p):
79
- return update_chatbot(message, history, system_message, max_tokens, temperature, top_p)
80
-
81
-
82
 
83
  # Gradio interface components
84
  system_msg = gr.Textbox(BASE_SYSTEM_MESSAGE, label="System Message", placeholder="System prompt.", lines=5)
@@ -89,8 +84,8 @@ top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.7)
89
  with gr.Blocks() as demo:
90
  chat_history_state = gr.State([])
91
  chatbot = gr.ChatInterface(
92
- fn=chatbot_function,
93
- additional_inputs=[system_msg, max_tokens, temperature, top_p],
94
  title="LLAMA 70B Free Demo",
95
  description="""
96
  <div style="text-align: center; font-size: 1.5em; margin-bottom: 20px;">
 
74
 
75
  chat_history = call_nvidia_api(chat_history, max_tokens_val, temperature_val, top_p_val)
76
  return chat_history
 
 
 
 
 
77
 
78
  # Gradio interface components
79
  system_msg = gr.Textbox(BASE_SYSTEM_MESSAGE, label="System Message", placeholder="System prompt.", lines=5)
 
84
  with gr.Blocks() as demo:
85
  chat_history_state = gr.State([])
86
  chatbot = gr.ChatInterface(
87
+ fn=update_chatbot,
88
+ additional_inputs=[chat_history_state, system_msg, max_tokens, temperature, top_p],
89
  title="LLAMA 70B Free Demo",
90
  description="""
91
  <div style="text-align: center; font-size: 1.5em; margin-bottom: 20px;">