OuroborosM commited on
Commit
f2a5c78
·
1 Parent(s): 577397f

update checkfile

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -1381,12 +1381,15 @@ def CheckFileinResp(response):
1381
  except Exception as e:
1382
  print("No wav found:", e)
1383
  try:
1384
- if '(sandbox:/' in response:
1385
- file = response.split("(sandbox:/")[-1].split(")")[0]
1386
- print("File found:", file)
1387
- return file
1388
- else:
1389
- return "N/A"
 
 
 
1390
  except Exception as e:
1391
  return "N/A"
1392
 
 
1381
  except Exception as e:
1382
  print("No wav found:", e)
1383
  try:
1384
+ listWord = ['(https://example.com/', '(sandbox:/']
1385
+ for item in listWord:
1386
+ if item in response:
1387
+ file = response.split(item)[-1].split(")")[0]
1388
+ print("File found:", file)
1389
+ return file
1390
+ else:
1391
+ continue
1392
+ return "N/A"
1393
  except Exception as e:
1394
  return "N/A"
1395