kh-CHEUNG commited on
Commit
3c65e4f
·
verified ·
1 Parent(s): fee8800

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -49,7 +49,8 @@ def respond(
49
  max_tokens,
50
  temperature,
51
  top_p,
52
- ):
 
53
  messages = [{"role": "system", "content": system_message}]
54
 
55
  for val in history:
@@ -108,7 +109,7 @@ transcribe_interface = gr.Interface(
108
  """
109
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
110
  """
111
-
112
  chatbot_sys_output = gr.Textbox(value="You are a friendly Chatbot.", label="System message")
113
  chatbot_max_tokens = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens")
114
  chatbot_temperature = gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature")
@@ -124,6 +125,7 @@ chat_interface = gr.ChatInterface(
124
  respond,
125
  title=application_title,
126
  description=application_description,
 
127
  additional_inputs=[
128
  chatbot_sys_output,
129
  chatbot_max_tokens,
 
49
  max_tokens,
50
  temperature,
51
  top_p,
52
+ ):
53
+
54
  messages = [{"role": "system", "content": system_message}]
55
 
56
  for val in history:
 
109
  """
110
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
111
  """
112
+ chatbot_main = = gr.Chatbot(label="Extraction")
113
  chatbot_sys_output = gr.Textbox(value="You are a friendly Chatbot.", label="System message")
114
  chatbot_max_tokens = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens")
115
  chatbot_temperature = gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature")
 
125
  respond,
126
  title=application_title,
127
  description=application_description,
128
+ chatbot=chatbot_main,
129
  additional_inputs=[
130
  chatbot_sys_output,
131
  chatbot_max_tokens,