Spaces:
Runtime error
Runtime error
David Li commited on
Commit ·
52c1fde
1
Parent(s): 0af678d
Fix: try again
Browse files
app.py
CHANGED
|
@@ -11,11 +11,11 @@ def get_video_id(url):
|
|
| 11 |
video_id = re.findall(r"v=([-\w]{11})", url)[0]
|
| 12 |
old_stdin = sys.stdin
|
| 13 |
if not sys.stdin.isatty():
|
| 14 |
-
sys.stdin = StringIO('
|
| 15 |
print("work around for gradio")
|
| 16 |
transcribe_and_summarize(video=url, output_dir=video_id)
|
| 17 |
else:
|
| 18 |
-
sys.stdin = StringIO('
|
| 19 |
print("guessing its not interactive")
|
| 20 |
transcribe_and_summarize(video=url, output_dir=video_id)
|
| 21 |
sys.stdin = old_stdin
|
|
|
|
| 11 |
video_id = re.findall(r"v=([-\w]{11})", url)[0]
|
| 12 |
old_stdin = sys.stdin
|
| 13 |
if not sys.stdin.isatty():
|
| 14 |
+
sys.stdin = StringIO('y')
|
| 15 |
print("work around for gradio")
|
| 16 |
transcribe_and_summarize(video=url, output_dir=video_id)
|
| 17 |
else:
|
| 18 |
+
sys.stdin = StringIO('y')
|
| 19 |
print("guessing its not interactive")
|
| 20 |
transcribe_and_summarize(video=url, output_dir=video_id)
|
| 21 |
sys.stdin = old_stdin
|