Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def format_chat_prompt(message, chat_history,instruction):
|
|
9 |
prompt= f"{prompt}\nUser: {message}\nAssistant:"
|
10 |
return prompt
|
11 |
|
12 |
-
def respond(message, chat_history,instruction,model,temperature
|
13 |
if model == "Llama2-Chat":
|
14 |
model = "meta-llama/Llama-2-7b-chat-hf"
|
15 |
else:
|
@@ -33,7 +33,7 @@ with gr.Blocks() as demo:
|
|
33 |
btn = gr.Button("Submit")
|
34 |
clear = gr.ClearButton(components=[msg,chatbot], value="Clear console")
|
35 |
|
36 |
-
btn.click(respond, inputs=[msg,chatbot,system,model], outputs=[msg, chatbot])
|
37 |
-
msg.submit(respond, inputs=[msg, chatbot,system,model], outputs=[msg, chatbot])
|
38 |
|
39 |
demo.queue().launch()
|
|
|
9 |
prompt= f"{prompt}\nUser: {message}\nAssistant:"
|
10 |
return prompt
|
11 |
|
12 |
+
def respond(message, chat_history,instruction,model,temperature):
|
13 |
if model == "Llama2-Chat":
|
14 |
model = "meta-llama/Llama-2-7b-chat-hf"
|
15 |
else:
|
|
|
33 |
btn = gr.Button("Submit")
|
34 |
clear = gr.ClearButton(components=[msg,chatbot], value="Clear console")
|
35 |
|
36 |
+
btn.click(respond, inputs=[msg,chatbot,system,model,temperature], outputs=[msg, chatbot])
|
37 |
+
msg.submit(respond, inputs=[msg, chatbot,system,model,temperature], outputs=[msg, chatbot])
|
38 |
|
39 |
demo.queue().launch()
|