Spaces:
Runtime error
Runtime error
Commit
·
ddaf3fe
1
Parent(s):
44ee3e2
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,7 +66,8 @@ def chat_accordion():
|
|
| 66 |
|
| 67 |
|
| 68 |
def format_chat_prompt(message: str, chat_history, bot_name: str, instructions: str) -> str:
|
| 69 |
-
|
|
|
|
| 70 |
prompt = instructions
|
| 71 |
for turn in chat_history:
|
| 72 |
user_message, bot_message = turn
|
|
@@ -118,8 +119,7 @@ def chat():
|
|
| 118 |
interactive=True,
|
| 119 |
label="Character",
|
| 120 |
)
|
| 121 |
-
|
| 122 |
-
instructions = INSTRUCTIONS_MAPPING[bot_name]
|
| 123 |
|
| 124 |
def run_chat(message: str, chat_history, bot_name: str, instructions: str, model: str, temperature: float, top_p: float):
|
| 125 |
if not message or (message == RETRY_COMMAND and len(chat_history) == 0):
|
|
|
|
| 66 |
|
| 67 |
|
| 68 |
def format_chat_prompt(message: str, chat_history, bot_name: str, instructions: str) -> str:
|
| 69 |
+
print(bot_name)
|
| 70 |
+
instructions = INSTRUCTIONS_MAPPING[bot_name].strip(" ").strip("\n")
|
| 71 |
prompt = instructions
|
| 72 |
for turn in chat_history:
|
| 73 |
user_message, bot_message = turn
|
|
|
|
| 119 |
interactive=True,
|
| 120 |
label="Character",
|
| 121 |
)
|
| 122 |
+
instructions=''
|
|
|
|
| 123 |
|
| 124 |
def run_chat(message: str, chat_history, bot_name: str, instructions: str, model: str, temperature: float, top_p: float):
|
| 125 |
if not message or (message == RETRY_COMMAND and len(chat_history) == 0):
|