cetusian commited on
Commit
e715acb
·
verified ·
1 Parent(s): eb487d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ llama_model = gr.load("models/meta-llama/Llama-3.1-8B-Instruct")
14
  def chat_with_llama(user_input):
15
  # Ensure user_input is correctly formatted as a string
16
  if isinstance(user_input, str):
17
- response = llama_model([user_input]) # Pass input as a list
18
  return response[0] # Return the first element of the output list
19
  else:
20
  return "Invalid input. Please provide a valid text."
 
14
  def chat_with_llama(user_input):
15
  # Ensure user_input is correctly formatted as a string
16
  if isinstance(user_input, str):
17
+ response = llama_model(user_input)
18
  return response[0] # Return the first element of the output list
19
  else:
20
  return "Invalid input. Please provide a valid text."