Spaces:
Sleeping
Sleeping
httpdaniel
commited on
Commit
·
87d87dd
1
Parent(s):
cba2c83
Cleaning project
Browse files
app.py
CHANGED
@@ -7,8 +7,6 @@ import gradio as gr
|
|
7 |
model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
8 |
client = InferenceClient(model=model_name)
|
9 |
|
10 |
-
proxies = {"https": "http://185.159.153.234:80", "http": "http://185.159.153.234:80"}
|
11 |
-
|
12 |
|
13 |
def transcribe_video(url):
|
14 |
video_id = parse_youtube_url(url)
|
@@ -45,10 +43,7 @@ def get_video_metadata(video_id):
|
|
45 |
|
46 |
def get_transcript_content(video_id):
|
47 |
try:
|
48 |
-
transcript = YouTubeTranscriptApi.get_transcript(
|
49 |
-
video_id,
|
50 |
-
proxies=proxies,
|
51 |
-
)
|
52 |
transcript_content = parse_transcript(transcript)
|
53 |
return transcript_content
|
54 |
except Exception as e:
|
|
|
7 |
model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
8 |
client = InferenceClient(model=model_name)
|
9 |
|
|
|
|
|
10 |
|
11 |
def transcribe_video(url):
|
12 |
video_id = parse_youtube_url(url)
|
|
|
43 |
|
44 |
def get_transcript_content(video_id):
|
45 |
try:
|
46 |
+
transcript = YouTubeTranscriptApi.get_transcript(video_id)
|
|
|
|
|
|
|
47 |
transcript_content = parse_transcript(transcript)
|
48 |
return transcript_content
|
49 |
except Exception as e:
|