Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ class IntelChatBot:
|
|
50 |
response = self.tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
51 |
return response
|
52 |
|
53 |
-
def
|
54 |
Intel_bot.set_system_message(system_message)
|
55 |
if not do_sample:
|
56 |
max_length = 780
|
@@ -83,7 +83,7 @@ with gr.Blocks(theme = "ParityError/Anime") as demo:
|
|
83 |
output_text = gr.Textbox(label="🧠🤌🏻NeuralChat Response")
|
84 |
|
85 |
def process(user_message, system_message, max_new_tokens, temperature, top_p, repetition_penalty, do_sample):
|
86 |
-
return
|
87 |
|
88 |
submit_button.click(
|
89 |
process,
|
|
|
50 |
response = self.tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
51 |
return response
|
52 |
|
53 |
+
def gradio_predict(user_message, system_message, max_new_tokens, temperature, top_p, repetition_penalty, do_sample):
|
54 |
Intel_bot.set_system_message(system_message)
|
55 |
if not do_sample:
|
56 |
max_length = 780
|
|
|
83 |
output_text = gr.Textbox(label="🧠🤌🏻NeuralChat Response")
|
84 |
|
85 |
def process(user_message, system_message, max_new_tokens, temperature, top_p, repetition_penalty, do_sample):
|
86 |
+
return gradio_predict(user_message, system_message, max_new_tokens, temperature, top_p, repetition_penalty, do_sample)
|
87 |
|
88 |
submit_button.click(
|
89 |
process,
|