Spaces:
Running
Running
moved video to examples
Browse files
app.py
CHANGED
@@ -41,6 +41,7 @@ def transcribe(audio_path):
|
|
41 |
|
42 |
def analyze_accent(url_or_file):
|
43 |
try:
|
|
|
44 |
if url_or_file.startswith("http"):
|
45 |
video_path = download_video(url_or_file)
|
46 |
else:
|
@@ -72,14 +73,9 @@ def analyze_accent(url_or_file):
|
|
72 |
output += f"**Transcript** (first 200 chars): {transcript[:200]}..."
|
73 |
|
74 |
# Clean up temp files
|
75 |
-
if
|
76 |
-
os.remove(video_path)
|
77 |
-
if isinstance(url_or_file, str):
|
78 |
-
os.remove(video_path)
|
79 |
-
if isinstance(url_or_file, str):
|
80 |
-
os.remove(video_path)
|
81 |
-
if isinstance(url_or_file, str):
|
82 |
os.remove(video_path)
|
|
|
83 |
os.remove(audio_path)
|
84 |
|
85 |
return output
|
|
|
41 |
|
42 |
def analyze_accent(url_or_file):
|
43 |
try:
|
44 |
+
print("Video path 1:", video_path)
|
45 |
if url_or_file.startswith("http"):
|
46 |
video_path = download_video(url_or_file)
|
47 |
else:
|
|
|
73 |
output += f"**Transcript** (first 200 chars): {transcript[:200]}..."
|
74 |
|
75 |
# Clean up temp files
|
76 |
+
if url_or_file.startswith("http"):
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
os.remove(video_path)
|
78 |
+
|
79 |
os.remove(audio_path)
|
80 |
|
81 |
return output
|