Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -41,20 +41,10 @@ def transcribe(audio_path):
|
|
41 |
|
42 |
def analyze_accent(url_or_file):
|
43 |
try:
|
44 |
-
if
|
45 |
-
video_path = download_video(url_or_file)
|
46 |
-
else:
|
47 |
-
video_path = url_or_file.name # local file upload
|
48 |
-
|
49 |
-
if isinstance(url_or_file, str):
|
50 |
-
video_path = download_video(url_or_file)
|
51 |
-
else:
|
52 |
-
video_path = url_or_file.name # local file upload
|
53 |
-
|
54 |
-
if isinstance(url_or_file, str):
|
55 |
video_path = download_video(url_or_file)
|
56 |
else:
|
57 |
-
video_path = url_or_file
|
58 |
|
59 |
audio_path = extract_audio(video_path)
|
60 |
|
@@ -122,7 +112,7 @@ with gr.Blocks() as demo:
|
|
122 |
|
123 |
gr.Examples(
|
124 |
examples=[
|
125 |
-
[
|
126 |
],
|
127 |
inputs=file_input,
|
128 |
outputs=file_output,
|
|
|
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:
|
47 |
+
video_path = url_or_file
|
48 |
|
49 |
audio_path = extract_audio(video_path)
|
50 |
|
|
|
112 |
|
113 |
gr.Examples(
|
114 |
examples=[
|
115 |
+
["cleo-abram.mp4"],
|
116 |
],
|
117 |
inputs=file_input,
|
118 |
outputs=file_output,
|