Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,17 +33,17 @@ def get_description_text():
|
|
| 33 |
|
| 34 |
client = Client("https://tonic1-tulu.hf.space/--replicas/xh5ff/")
|
| 35 |
|
| 36 |
-
async def send_messages_with_tulua_pi(recipient,messages,sender):
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
if len(messages) >0:
|
| 40 |
-
message_text= messages[-1]['content']
|
| 41 |
-
result await client.predict(message_text)
|
| 42 |
-
|
| 43 |
-
if 'message' in result :
|
| 44 |
-
reponse_content=result['message']
|
| 45 |
-
|
| 46 |
-
chatiface.send(reponse_content,user=sender.name,resend=False)
|
| 47 |
|
| 48 |
# Define a panel Row for OpenAI settings.
|
| 49 |
openai_row = pn.Row(txt_model, pwd_openai_key, pwd_openai_url)
|
|
|
|
| 33 |
|
| 34 |
client = Client("https://tonic1-tulu.hf.space/--replicas/xh5ff/")
|
| 35 |
|
| 36 |
+
# async def send_messages_with_tulua_pi(recipient,messages,sender):
|
| 37 |
+
# response_content =""
|
| 38 |
+
#
|
| 39 |
+
# if len(messages) >0:
|
| 40 |
+
# message_text= messages[-1]['content']
|
| 41 |
+
# result await client.predict(message_text)
|
| 42 |
+
#
|
| 43 |
+
# if 'message' in result :
|
| 44 |
+
# reponse_content=result['message']
|
| 45 |
+
#
|
| 46 |
+
# chatiface.send(reponse_content,user=sender.name,resend=False)
|
| 47 |
|
| 48 |
# Define a panel Row for OpenAI settings.
|
| 49 |
openai_row = pn.Row(txt_model, pwd_openai_key, pwd_openai_url)
|