umaiku commited on
Commit
d1fef0d
·
verified ·
1 Parent(s): a37b742

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -38,14 +38,14 @@ def respond(
38
 
39
  print(message)
40
 
41
- for val in history:
42
  if val[0]:
43
  messages.append({"role": "user", "content": val[0]})
44
  if val[1]:
45
  messages.append({"role": "assistant", "content": val[1]})
46
 
47
  messages.append({"role": "user", "content": message})
48
-
49
  response = ""
50
 
51
  for message in client.chat_completion(
@@ -67,7 +67,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
67
  demo = gr.ChatInterface(
68
  respond,
69
  additional_inputs=[
70
- gr.Textbox(value="An Expert in Legal advice.", label="System message"),
71
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
72
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
73
  gr.Slider(
 
38
 
39
  print(message)
40
 
41
+ """ for val in history:
42
  if val[0]:
43
  messages.append({"role": "user", "content": val[0]})
44
  if val[1]:
45
  messages.append({"role": "assistant", "content": val[1]})
46
 
47
  messages.append({"role": "user", "content": message})
48
+ """
49
  response = ""
50
 
51
  for message in client.chat_completion(
 
67
  demo = gr.ChatInterface(
68
  respond,
69
  additional_inputs=[
70
+ gr.Textbox(value="You are an assistant in Swiss Jurisprudence cases.", label="System message"),
71
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
72
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
73
  gr.Slider(