Spaces:
Runtime error
Runtime error
yizhangliu
commited on
Commit
•
e16bd9c
1
Parent(s):
326663b
Update app.py
Browse files
app.py
CHANGED
@@ -54,11 +54,11 @@ def chat(input0, input1, chat_radio, chat_history):
|
|
54 |
out_chat = []
|
55 |
if chat_history != '':
|
56 |
out_chat = json.loads(chat_history)
|
|
|
57 |
if chat_radio == "Talk to chatGPT":
|
58 |
response = get_response_from_chatbot(input0)
|
59 |
out_chat.append((input0, response))
|
60 |
chat_history = json.dumps(out_chat)
|
61 |
-
logger.info(f"out_chat_: {len(out_chat)} / {chat_radio}")
|
62 |
return out_chat, input1, chat_history
|
63 |
else:
|
64 |
prompt_en = getTextTrans(input0, source='zh', target='en') + f',{random.randint(0,sys.maxsize)}'
|
|
|
54 |
out_chat = []
|
55 |
if chat_history != '':
|
56 |
out_chat = json.loads(chat_history)
|
57 |
+
logger.info(f"out_chat_: {len(out_chat)} / {chat_radio}")
|
58 |
if chat_radio == "Talk to chatGPT":
|
59 |
response = get_response_from_chatbot(input0)
|
60 |
out_chat.append((input0, response))
|
61 |
chat_history = json.dumps(out_chat)
|
|
|
62 |
return out_chat, input1, chat_history
|
63 |
else:
|
64 |
prompt_en = getTextTrans(input0, source='zh', target='en') + f',{random.randint(0,sys.maxsize)}'
|