Spaces:
Runtime error
Runtime error
Commit
·
979b5c4
1
Parent(s):
247e008
correct issue
Browse files
app.py
CHANGED
@@ -760,7 +760,7 @@ python_tool3 = Tool(
|
|
760 |
func = Code_Runner,
|
761 |
description = "Code Interpreter which is able to run code block in local machine.\
|
762 |
It is capable to treat any task by running the code and output the result. (i.e. analyzer data, modify/creat documents ...)\
|
763 |
-
You should input python code."
|
764 |
)
|
765 |
|
766 |
|
@@ -1379,7 +1379,7 @@ def CheckFileinResp(response):
|
|
1379 |
# return "N/A"
|
1380 |
except Exception as e:
|
1381 |
# return "N/A"
|
1382 |
-
|
1383 |
|
1384 |
return Filelist
|
1385 |
|
@@ -1406,16 +1406,33 @@ def chathmi4(message, history2):
|
|
1406 |
print ("response of chatbot:", response)
|
1407 |
# real_content = response[-1:]
|
1408 |
# print("real_content", real_content)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1409 |
try:
|
1410 |
# temp = response.split("(sandbox:/")[1] # (sandbox:/sample-20230805-0807.wav)
|
1411 |
-
|
1412 |
-
print("file_name:",
|
1413 |
-
if
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
|
|
|
|
|
|
|
|
1417 |
except Exception as e:
|
1418 |
-
print("No need to add file in chatbot:", e)
|
|
|
|
|
1419 |
|
1420 |
except Exception as e:
|
1421 |
print("chathmi4 error:", e)
|
|
|
760 |
func = Code_Runner,
|
761 |
description = "Code Interpreter which is able to run code block in local machine.\
|
762 |
It is capable to treat any task by running the code and output the result. (i.e. analyzer data, modify/creat documents ...)\
|
763 |
+
You should input detail python script code."
|
764 |
)
|
765 |
|
766 |
|
|
|
1379 |
# return "N/A"
|
1380 |
except Exception as e:
|
1381 |
# return "N/A"
|
1382 |
+
print("no file with", listWord)
|
1383 |
|
1384 |
return Filelist
|
1385 |
|
|
|
1406 |
print ("response of chatbot:", response)
|
1407 |
# real_content = response[-1:]
|
1408 |
# print("real_content", real_content)
|
1409 |
+
# try:
|
1410 |
+
# # temp = response.split("(sandbox:/")[1] # (sandbox:/sample-20230805-0807.wav)
|
1411 |
+
# file_name = CheckFileinResp(response)
|
1412 |
+
# print("file_name:", file_name)
|
1413 |
+
# if file_name != "N/A":
|
1414 |
+
# history2 = history2 + [(None, (file_name,))]
|
1415 |
+
# Filename_Chatbot = file_name
|
1416 |
+
# yield ["", history2, "SUBMIT", "STOP"]
|
1417 |
+
# except Exception as e:
|
1418 |
+
# print("No need to add file in chatbot:", e)
|
1419 |
+
|
1420 |
try:
|
1421 |
# temp = response.split("(sandbox:/")[1] # (sandbox:/sample-20230805-0807.wav)
|
1422 |
+
file_names = CheckFileinResp(response)
|
1423 |
+
print("file_name:", file_names)
|
1424 |
+
if file_names != []:
|
1425 |
+
for file_name in file_names:
|
1426 |
+
if file_name != "":
|
1427 |
+
history2 = history2 + [(None, (file_name,))]
|
1428 |
+
Filename_Chatbot = file_name
|
1429 |
+
yield ["", history2]
|
1430 |
+
else:
|
1431 |
+
print("No File Found in Response")
|
1432 |
except Exception as e:
|
1433 |
+
print("No need to add file in chatbot:", e)
|
1434 |
+
|
1435 |
+
|
1436 |
|
1437 |
except Exception as e:
|
1438 |
print("chathmi4 error:", e)
|