rwitz commited on
Commit
3e0a4e9
·
verified ·
1 Parent(s): 818b22e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -73,6 +73,11 @@ import os
73
 
74
  # Function to get bot response
75
  def format_prompt(state, bot_index, character_name, character_description):
 
 
 
 
 
76
  prompt = f"{character_description}\n\n"
77
  for message in state["history"][bot_index]:
78
  if message['role'] == 'user':
 
73
 
74
  # Function to get bot response
75
  def format_prompt(state, bot_index, character_name, character_description):
76
+ if character_name is None or character_name.strip() == "":
77
+ character_name = "Ryan"
78
+ if character_description is None or character_description.strip() == "":
79
+ character_description = "Ryan is a college student who is always willing to help. He knows a lot about math and coding."
80
+
81
  prompt = f"{character_description}\n\n"
82
  for message in state["history"][bot_index]:
83
  if message['role'] == 'user':