Spaces:
Sleeping
Sleeping
Dy
commited on
Commit
•
396d793
1
Parent(s):
6fafb4a
Update app.py
Browse files
app.py
CHANGED
@@ -33,12 +33,14 @@ def get_captions(url):
|
|
33 |
print(e)
|
34 |
return "Error. Could not fetch captions."
|
35 |
|
|
|
|
|
36 |
def answer_question(youtube_url, user_question):
|
37 |
# You can implement your logic here to process the video, transcribe it, and answer the user question.
|
38 |
# For now, let's return the user question as output.
|
39 |
|
40 |
f= open("temp.txt","w+")
|
41 |
-
f.write(get_captions(
|
42 |
f.close()
|
43 |
|
44 |
loader = TextLoader("temp.txt")
|
|
|
33 |
print(e)
|
34 |
return "Error. Could not fetch captions."
|
35 |
|
36 |
+
|
37 |
+
|
38 |
def answer_question(youtube_url, user_question):
|
39 |
# You can implement your logic here to process the video, transcribe it, and answer the user question.
|
40 |
# For now, let's return the user question as output.
|
41 |
|
42 |
f= open("temp.txt","w+")
|
43 |
+
f.write(get_captions(youtube_url))
|
44 |
f.close()
|
45 |
|
46 |
loader = TextLoader("temp.txt")
|