Tonic commited on
Commit
d0d8a82
·
1 Parent(s): 7504c85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -54,7 +54,7 @@ class FalconChatBot:
54
  # Process the history to remove special commands
55
  processed_history = self.process_history(history)
56
  # Combine the user and assistant messages into a conversation
57
- conversation = f"{self.system_prompt}\n {assistant_message if assistant_message else ''}\n {user_message}\n "
58
  # Encode the conversation using the tokenizer
59
  input_ids = tokenizer.encode(conversation, return_tensors="pt", add_special_tokens=False)
60
  input_ids = input_ids.to(device)
@@ -98,8 +98,8 @@ examples = [
98
  "Le dialogue suivant est une conversation entre Emmanuel Macron et Elon Musk:", # user_message
99
  "[Emmanuel Macron]: Bonjour Monsieur Musk. Je vous remercie de me recevoir aujourd'hui.", # assistant_message
100
  # history, # history
101
- 200, # max_new_tokens
102
- 0.4, # temperature
103
  0.90, # top_p
104
  1.9, # repetition_penalty
105
  ]
@@ -151,7 +151,7 @@ iface = gr.Interface(
151
  description=description,
152
  examples=examples,
153
  inputs=[
154
- gr.inputs.Textbox(label="Utilisez se format pour initier une conversation [Personage:]", type="text", lines=5),
155
  ] + additional_inputs,
156
  outputs="text",
157
  theme="ParityError/Anime"
 
54
  # Process the history to remove special commands
55
  processed_history = self.process_history(history)
56
  # Combine the user and assistant messages into a conversation
57
+ conversation = f"{self.system_prompt} {assistant_message if assistant_message else ''} {user_message} "
58
  # Encode the conversation using the tokenizer
59
  input_ids = tokenizer.encode(conversation, return_tensors="pt", add_special_tokens=False)
60
  input_ids = input_ids.to(device)
 
98
  "Le dialogue suivant est une conversation entre Emmanuel Macron et Elon Musk:", # user_message
99
  "[Emmanuel Macron]: Bonjour Monsieur Musk. Je vous remercie de me recevoir aujourd'hui.", # assistant_message
100
  # history, # history
101
+ 150, # max_new_tokens
102
+ 0.9, # temperature
103
  0.90, # top_p
104
  1.9, # repetition_penalty
105
  ]
 
151
  description=description,
152
  examples=examples,
153
  inputs=[
154
+ gr.Textbox(label="Utilisez se format pour initier une conversation [Personage:]", type="text", lines=5),
155
  ] + additional_inputs,
156
  outputs="text",
157
  theme="ParityError/Anime"