Spaces:
Runtime error
Runtime error
Commit
·
fe8f569
1
Parent(s):
af1e847
update filecheck
Browse files
app.py
CHANGED
|
@@ -1435,11 +1435,14 @@ def CheckFileinResp(response):
|
|
| 1435 |
print("No wav found:", e)
|
| 1436 |
|
| 1437 |
try:
|
| 1438 |
-
pattern = r"(?i)'(\w+\.(?:pptx|docx|doc|xlsx|txt|png|jpg))'"
|
| 1439 |
result = re.findall(pattern, response)
|
| 1440 |
-
print("Other file in response:", result)
|
| 1441 |
for item in result:
|
|
|
|
|
|
|
| 1442 |
Filelist.append(item)
|
|
|
|
| 1443 |
except Exception as e:
|
| 1444 |
print("No other file found:", e)
|
| 1445 |
|
|
|
|
| 1435 |
print("No wav found:", e)
|
| 1436 |
|
| 1437 |
try:
|
| 1438 |
+
pattern = r"(?i)'?([\w./]*\w+\.(?:pptx|docx|doc|xlsx|txt|png|jpg))'?"
|
| 1439 |
result = re.findall(pattern, response)
|
| 1440 |
+
# print("Other file in response:", result)
|
| 1441 |
for item in result:
|
| 1442 |
+
if '/' in item:
|
| 1443 |
+
item = item.split('/')[-1]
|
| 1444 |
Filelist.append(item)
|
| 1445 |
+
print("Other file in response:", item)
|
| 1446 |
except Exception as e:
|
| 1447 |
print("No other file found:", e)
|
| 1448 |
|