ruslanmv commited on
Commit
d212f4f
·
verified ·
1 Parent(s): 94576e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -73,9 +73,10 @@ if prompt := st.chat_input("Type your message..."):
73
  try:
74
  # Generate response using the model
75
  with st.spinner("Generating response..."):
 
76
  response = demo(
77
- inputs=f"{system_message}\n\nUser: {prompt}\nAssistant:",
78
- max_length=max_tokens, # Matches Gradio's expected parameter name
79
  temperature=temperature,
80
  top_p=top_p
81
  )
 
73
  try:
74
  # Generate response using the model
75
  with st.spinner("Generating response..."):
76
+ # Pass inputs as positional arguments to the Gradio model
77
  response = demo(
78
+ f"{system_message}\n\nUser: {prompt}\nAssistant:",
79
+ max_length=max_tokens, # Gradio parameter
80
  temperature=temperature,
81
  top_p=top_p
82
  )